10-01-2014 03:48 PM - edited 10-01-2014 03:58 PM
can someone tells me why this doesnt work?
i tried to
open excel, open worksheet, write to new worksheet #2, autofit to one page for work sheet #2,
write to new worksheet #3, autofit sheet #3.
all those are working...
but when i tried closing the excel and saving it is when i have alot of errors.
can someone help me?
thanks
10-01-2014 05:47 PM - edited 10-01-2014 06:04 PM
i was able to do this.
but this really beats the purpose of automating it because i still have to click on SAVE, AND SAVE as excel, etc.
10-01-2014 08:19 PM
Try to use _Workbook | SaveAs method and set the ConflictResolution to 1
10-02-2014 12:22 PM
hmm, that didnt work for me.
10-02-2014 04:51 PM
I will post my Excel automation library tonight. I never had problems with pop ups or other errors.
10-02-2014 11:25 PM - edited 10-02-2014 11:27 PM
Check this VI.
10-03-2014 09:59 PM
I uploaded some code and example here: https://decibel.ni.com/content/docs/DOC-39826
10-04-2014 11:13 PM
I'm not sure which version of LabVIEW you are using, nor what some of the VIs are in your code. However, if you have a recent version of LabVIEW (say 2012 or later) and have access to the Report Generation Toolkit, you will have a much easier time working with Excel.
In January of this year, I posted an Example to replace the Excel example that ships with LabVIEW. However, I'm not very good at finding my own posts on this forum, so I can't easily point you to it. However, if you do use the Report Generation Toolkit and do not use ActiveX calls, you will find that the functions to open and close Excel Reports tend to work without significant problems (there is a glitch, that I've reported, whereby if you "manually" close the Excel Workbook and then try to close it with the Report Generation's "Save Workbook", it will actually delete the manually-saved Workbook for you)(there is a "work-around" until NI fixes this ...).
Bob Schor
10-04-2014 11:18 PM
My previous post to which I referred is called: Revised "Generate Excel Report" Example (The Quotes are part of the title).
BS
10-06-2014 11:33 AM
hi chembo,
thank you!
but i am currently using labview 2010 right now.
i made the purchased for the new labview software so maybe i can view it later.
but i think we got the report generation kit so i'll test that out too. i heard its easier to make reports with it.
thanks