Excel with CSV table - excel

We got a measuring device thats connected to a CSV file. Whenever we measure a product the CSV get's updated.
This CSV file is then connected to a excel file to make it user friendly and to add comments. So the CSV file is connected and displayed in a table. We added another column to this table to put a comment.
The problem is when we the csv file updates (new row) the comment of the last row goes down to the new row.
Example: The digits come from the CSV file, and the ok is added manually.
When we refresh the workbook so the new row gets added we get the following result:
The ok from row 2 goes down to new row.
It should be like this:
Is there a way to save/stuck the manually added value to a row?

Related

Copy excel records between two files into Table formatted rows

probably somebody could help me.
I have two excel files and I want to copy (overwrite) data from the source.xlsx into the destination.xlsx
The main problem is, that in the source.xlsx the data are only instered without any formating, but in the destination.xlsx the data are formatted as a table with a name of the table.
I want to schedule with powershell (power automate is too slow for that) the following:
Delete all rows from the destination.xlsx (formatted as a table), only the Titles (1st row) can't be delete.
Copy all rows (without the Titles - 1st row) from the source xlsx into the destination.xlsx file into the formatted table.
How can I manage it?
I tried the delete the destination.xlsx file and re-create it form the source.xlsx and it looked like it worked, but it wasn't good, because the destination.xlsx file is conntected to one powerapps application and it couldn't be used after the re-creation of the file.
I tried the delete the destination.xlsx file and re-create it form the source.xlsx and it looked like it worked, but it wasn't good, because the destination.xlsx file is conntected to one powerapps application and it couldn't be used after the re-creation of the file.
you may download https://www.powershellgallery.com/packages?q=enlib
and check the sourcecode - there are quite simple functions to export/import csv-xlsx which can help you understand how to work with tables

Excel Power Query - Save changes made to output table before refresh

I have a workbook with 2 sheets containing the same list of clients, but with different data relating to the client. Both sheets use LastName and FirstName as the first two column headers. Both sheets have about 10 additional columns, each being unique.
Sheet 1 is the "master list" table with 90 current names. We insert a row and add new names as
we get new clients.
I am trying to get sheet 2, with 65 of the 90 names, to update dynamically when a new row and name is added to Sheet 1.
After researching, I found I could use Power Query to merge Sheet 1 with Sheet 2 and Load the Output to a new Sheet. Let's call it Merged.
It looks great, so I hid the original Sheet 2 because it is now outdated. I no longer want to interact with Sheet 2, I want to interact with the new Merged Sheet. Now when I add a row to Sheet 1, Merged updates nicely with a new row and Names in place.
Problem: I can't add or change data on the Merged Sheet (Query output) without it disappearing as soon as I Refresh. It reverts back to the original.
Can I overwrite/add data to the Power Query output and save those changes? Somehow preventing Sheet 2 from clearing out the new data. Is that even a thing?
Can I Only update one of the connections - Sheet 1 and leave Sheet 2 dormant?
Am I using Power Query when I should be using something like XLookup?
I want to get rid of the original Sheet 2. It has become obsolete now that 30 new clients have been added to Sheet 1, and will continue to fall behind.
Thanks for the help.
Initially I was stumped on how to merge two sheets while shuffling the new names with the old, but a Power Query work for that problem.
Then I had the new table with the data in the correct position and order.
I found the quick tutorial from Jenn at this link; When a row is added to one sheet, automatically add a row to another sheet
This opened my eyes to the possibility that a Query can be only one connection. So I created a new sheet with the single query to the names on Sheet 1.
I copy/pasted the Merged info into the new sheet, and expanded the table range to include the new info and viola! I have a dynamically updating sheet based on the Sheet 1 list of names.
Now I can delete the original Sheet 2 and move forward and the original query.

How to transform the excel file which doesn't have the column header in Azure Data Factory

I am getting one excel file every day in the data lake. My requirement is to export the excel file into an SQL database using ADF. I have five sheets in the excel file. Among the five, I have one excel sheet that doesn't have one column header. I successfully exported all four sheets into the SQL database.
I stuck with the above one sheet which doesn't have a column header. Below is the data for this excel sheet
See, the first column doesn't have a header. When I tried to use copy activity, the schema is neglecting the first column as it doesn't have a header. When I untick the first row as a header, then it's recognised. However, I don't want to use this because the column header for other columns considers a row value which is difficult as everyday new excel file is getting added.
Any advice on how to address this issue? Tried a lot, with no success.
I tried to reproduce this issue. But initially I got below error.
ErrorCode=DelimitedTextColumnNameNotAllowNull,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=The
name of column index 1 is empty. Make sure column name is properly
specified in the header row.,Source=Microsoft.DataTransfer.Common,'
Source File:
So I used DataFlow activity and resolved the issue.
Follow below steps.
Step1: Select Excel as Source.
Step2: Select transformation settings.
Step3: Execute Pipeline.
Data stored in SQL DB.

Outputting a single Excel file with multiple worksheets

Is there a component in Talend Open Studio for Data Integration to be able to output a single Excel file but with 2 separate sheets in it?
I want to separate some columns in the original file into another sheet and another set of columns to the second sheet.
You'll need to output your data into two separate tFileOutputExcel components with the second one set to append the data to the file as a different sheet.
A quick example has some name and age data held against a unique id that needs to be split into two separate sheets with id and name on one sheet and id and age on another sheet.
I'm generating this data using the tRowGenerator component configured to generate a sequence for the id and random first names and ages between 18 and 75:
I then split this data using a tMap component:
The first flow of data can go to the first tFileOutputExcel component to create the file with a "Names" sheet:
Unfortunately we can't just output the second sheet of data straight away to the next file as Talend will need to open a write lock on the Excel file. So instead we stash the data into memory using the tBufferOutput component in this case (although we could also use a tHashOutput component or potentially stash the data on disk in either a temporary file or database if this is likely to exceed total memory).
Once the first sub job is completed writing the names data to the Names sheet of our target file we can then read the Age data out of the buffer and into the second tFileOutputExcel which is then configured to append the sheet of data to the target file:

Update excel from access shuffles rows

We have an access 2003 database and an excel 2003. We connected the excel to import the data from the access, so far so good.
At the end of the imported data right to the next 3 fields of the excel we want to add some comments, text.
Up to here all work fine, but when we update the data to excel the rows shuffle and the comments at the right columns remain at the same row. So the data rows shuffle and the comment rows remain at the same position.
So if row 3 has at the right the comment 3, when we update the worksheet to retrieve the new data from access it replaces row 3 with data from another row but the comment remains at row 3.
Is there a way for the excel to keep the imported data to the same position and not shuffling it?
We tried all the options at excel "What to do when new lines of data are available" but all do the same, it shuffles the data when we update, even if access has no new data.
Thank you in advance.
I think you will find that when you imported data from Access, Excel created/named a range called 'database' or 'data' or something like that. You need to expand that definition to include the added columns.

Resources