03-07-2012 11:30 PM - edited 03-07-2012 11:31 PM
Hi Everyone,
I need help from you guys..:) I want to fetch excel sheet from different files (say for example from 3 excel files) and put in to one template file. If any one have idea regarding this please let me know. Thanks in advance
Thanks & Regards
saamy
03-08-2012 12:41 AM
I guess you can do that using ActiveX but not sure how to create a template. Try searching in the Excel Board
03-08-2012 01:04 AM
Hi Anand, Thanks a lot for the reply. Ya I know using activeX we can copy to another workbook... But what I want is, I want to add these sheets to my excel template...For eg: I have three excel files, from these files I want to take one sheet from each file and put in to the excel template..If you have any idea plz let me know..Thanks in advance..
03-10-2012 12:25 PM
03-10-2012 04:24 PM
@saamy wrote:
Hi Everyone,
I need help from you guys..:) I want to fetch excel sheet from different files (say for example from 3 excel files) and put in to one template file. If any one have idea regarding this please let me know. Thanks in advance
Thanks & Regards
saamy
http://forums.ni.com/t5/LabVIEW/Copy-an-excel-worksheet-from-one-workbook-to-another/td-p/1880539 previous discussion of same topic.
03-12-2012 09:15 PM
Hii Puneet K & nyc,
Thanks a lot for ur links guys...:) am already done :)...will upload the working code shortly...and am facing some other problem now...when I execute the program in LV 11.0 version its working fine, but when I try to run the same code in LV10.0 (32 bit machine) its showing this error
"Error -2146827284 occurred at Exception occured in Microsoft Office Excel: Excel cannot insert the sheets into the destination workbook, because it contains fewer rows and columns than the source workbook. To move or copy the data to the destination workbook, you can select the data, and then use the Copy and Paste commands to insert it into the sheets of another workbook.Help Path is C:\Program Files\Microsoft Office\Office12\1033\XLMAIN11.CHM and context 0 in copy_excel_worksheet.vi
This error code is undefined. Undefined errors might occur for a number of reasons. For example, no one has provided a description for the code, or you might have wired a number that is not an error code to the error code input.
Additionally, undefined error codes might occur because the error relates to a third-party object, such as the operating system or ActiveX. For these third-party errors, you might be able to obtain a description of the error by searching the Web for the error code (-2146827284) or for its hexadecimal representation (0x800A03EC)."
If you guys know the solution please let me knoe...thanks in advance..:)
Thanks & Regards
saamy
03-19-2012 01:36 AM - edited 03-19-2012 01:45 AM
Hello guys,
Am getting error like "
"Error -2146827284 occurred at Exception occured in Microsoft Office Excel: Excel cannot insert the sheets into the destination workbook, because it contains fewer rows and columns than the source workbook. To move or copy the data to the destination workbook, you can select the data, and then use the Copy and Paste commands to insert it into the sheets of another workbook.Help Path is C:\Program Files\Microsoft Office\Office12\1033\XLMAIN11.CHM and context 0 in copy_excel_worksheet.vi
This error code is undefined. Undefined errors might occur for a number of reasons. For example, no one has provided a description for the code, or you might have wired a number that is not an error code to the error code input.
Additionally, undefined error codes might occur because the error relates to a third-party object, such as the operating system or ActiveX. For these third-party errors, you might be able to obtain a description of the error by searching the Web for the error code (-2146827284) or for its hexadecimal representation (0x800A03EC)."
" this when I try to copy a worksheet to another workbook. can any1 help to overcome this problem. I have attached the code.
Please check the attachment.
My labview version is 11.0
Thanks in advance
Thanks & Regards
Saamy
04-02-2012 04:51 PM
MS Office 11 only supports 64K rows, while Office 12 supports 1 million. If you open a LV generated spreadsheet file, it will be converted to the 1 million row format automatically. If you open the older Office 11 format (i.e. your template.xls file), it will be opened in "Compatibility Mode" and restricted to 64K rows. This will prevent you from copying the whole sheet from the new file to the template.
Your options are:
1. Save the template as a XLSX file to upgrade the format
2. Use Save As on the new file to create a native .XLS workbook file before the move