04-20-2012 08:09 PM
I am writing a vi in which I need to be able to fill a multicolumn listbox from an excel Spreadsheet. The Spreadsheet will preferably be saved in .xlsm format but that can be changed if necessary. I have the MS Office Report generation tool kit but have had little luck getting it to do what I want. I have attached a sample spread sheet with the exact same formatting as the real one will have except it is in .xlsx because the NI forum apparently does not like .xlsm (the formatting can change as well if necessary).
04-21-2012 08:09 AM
You said you had little luck. What exactly did you try? Were you able to read the contents of the workbook? Do you not know how to write to the listbox? What is your specific issue?
04-21-2012 02:48 PM
Please post your VI.
This message board is not a write-a-VI for you service though some people seem to think so.
04-22-2012 07:33 PM
04-23-2012 11:46 AM
I was unable to find any feasible solutions using the Report generation tool kit but I may have missed something. The reason I would prefer a .xlsm format is this database will be being updated from time to time and If I lock the workbook and put in some editing macros in it, I can ensure that the workbook has the proper number format and cell formatting. I have not had any issues with getting security warning from my system as of yet but I know in the past I have made digital signatures and have given them trusted status in order to alleviate these types of issues. Attached is the portion of my code that is doing the data importing. So far this is as close as I have gotten (and it is still not right) and I had to change the file to .csv format. If I change it to .xlsm or .xlsx it does not recognize the formatting and it just comes out as a bunch of random symbols.
04-23-2012 12:42 PM
Hi, CSV files are definitely easier to handle however, you can implement something similar to this example to read the excel file. I hope this helps.
04-23-2012 03:25 PM
Thank you alcava.cr with a slight modification to your program it did the trick. I was misinterpreting the use of the new report block I was understanding it to create new reports not to create or open a report I guess I have a long way to go in learning labview. Also thank you to everybody else who contributed you guys have saved me A LOT of time and I really appreciate your time and effort in the matter ![]()