LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to save excel file after changes made

I change the size of the cells in an excel file and when I try to use the workbook invoke save followed by workbook invoke close, an error happens following invoke close. The error only appears when I make the savechanges part of invoke close True. If I leave invoke close savechanges False, file is closed without changes and without error. So what could be the problem when I make savechanges True?
0 Kudos
Message 1 of 7
(4,356 Views)
Could you attach your vi to see the problem? There must be something wrong in the way you save your Excel workbook, and that makes close fail. Attach your vi in LV 5.0 version or i shall not be able to see it.
Good luck
0 Kudos
Message 2 of 7
(4,356 Views)
Hi Gorka Larrea,
Here is the vi and a sample file I want to change. Hope you can view it. Thanks for any help you may be able to provide.
Download All
0 Kudos
Message 4 of 7
(4,356 Views)
Unfortunatelly, as i mentioned in my posting, i only have labview 5.0 and can't open LV 6 files if they are not saved as previous version. But probably you can follow Brians advice and use a file completely created in Excel, using the property invokes you already know, and not a spreadsheet file.
Good luck
0 Kudos
Message 6 of 7
(4,356 Views)
Can anyone tell me why this vi well not save changes.
Download All
0 Kudos
Message 3 of 7
(4,356 Views)
Part of the problem is that the spreadsheet file you were using was not an Excel worksheet, it was a tab delimited text file. You can't save the column widths in that format. If you start with a excel spreadsheet and wire the filename to the "Filename" input of the Workbook Close invoke node then it works. If you start with file you provided then it will bring up a saveas prompt. I don't know how to save the file without prompts coming up if it was no an excel file to begin with.

I have found that you don't even really need that Close node, it will be closed when you use the Quit Application node.

I have changed the vi so that it works for me.
0 Kudos
Message 5 of 7
(4,356 Views)
I understand the problem now. The change you made to my VI has helped me a lot. Thanks for the help.

-iceman
0 Kudos
Message 7 of 7
(4,356 Views)