ni.com is currently experiencing issues.
Support teams are actively working on the resolution.
ni.com is currently experiencing issues.
Support teams are actively working on the resolution.
08-28-2019 05:16 AM
Hello everyone.
I am searching for a solution in LabVIEW to convert every sheet from a excel file in .csv files. I use .csv files with Read from Spreadsheet to extract some data and and it will be more efficient to give the path to excel file in the application than to save each sheet with .csv format and give the path to each of them.
Has anyone any idea if I can implement what I propose?
08-28-2019 06:06 AM
08-28-2019 03:01 PM
I'm a little bit confused on what you want to do. But first, let me digress a minute:
So here's my question: what do you really want to do? Do you have an Excel (.xlsx) file? Does it have any Excel-specific "features" (such as formatting, column widths, coloring, graphs, etc.)? What do you really want to do with it?
You mention that the Excel file has multiple Sheets, and that you want to process all (?) or some (?) of them (this is not clear). You seem to be hung up on how to handle the multiple Sheets, and seem to be looking for a generalization of the CSV format that would allow you to have a single File with multiple CSV-formatted data inside it. This is sounding already too complicated.
So here are some suggestions. Let's assume your Excel file is called My Data.xlsx, and it has four sheets, Run 1, Run 2, Run 3, and Run 4. Note that I'm assuming you have the Report Generation Toolkit, which allows you to read and write Excel (.xlsx) files.
Bob Schor
P.S. -- did you realize that the RGT can be used to read Excel files, as well as write them?
08-28-2019 03:57 PM
So, you do as Bob suggested, or you read the xlsx as a zip file, and open *.xlsx\xl\worksheets\sheet1.xml and extract the table from the <row>, <c> and <v>-tags.
/Y
08-28-2019 07:23 PM
@Bob_Schor wrote:So here's my question: what do you really want to do? Do you have an Excel (.xlsx) file? Does it have any Excel-specific "features" (such as formatting, column widths, coloring, graphs, etc.)? What do you really want to do with it?
As stated in the thread title and the first post, they want to open that .xlsx file, take the values, and put them into a csv file.
08-28-2019 07:33 PM
@natasftw wrote:
As stated in the thread title and the first post, they want to open that .xlsx file, take the values, and put them into a csv file.
Yes, but they specifically said they didn't want to have to deal with multiple CSV files, hence my confusion and request for clarification. I was trying to figure out what they wanted to do, as I could (mis-)interpret the post in multiple ways. I've been wrong before (as recently as yesterday!).
Bob Schor
08-29-2019 09:37 AM
05-31-2023 07:52 AM
@alexderjuengere wrote:
in this thread, someone attached a .llb based on Active X to read cell values from an .xlsx file
today, I rather would suggest to use this: https://forums.ni.com/t5/LabVIEW/Darren-s-Occasional-Nugget-09-26-2022/m-p/4257690#M1239480