Closed ashishbhasin29 closed 1 year ago
Hello--
After you have opened each workbook, you do not need to reopen the workbook again. The method call
lnSh1 = thisform.Vfpxworkbookxlsx1.OpenXlsxWorkbookSheet("D:\TEMP\packing-list.xlsx", "SHEET1")
Opens the workbook a second time. Use the method GetSheetIndex() to get a reference to the sheet; i.e. "SHEET1". Then use the method GetCellValue() to retrieve the value for each cell that you want. Use the method SetCellValue() to set the value into the second workbook sheet. After writing the cell values to the second workbook, use the method SaveWorkbook() to save the changes to the second workbook.
Greg
From: ashishbhasin29 @.> Sent: Wednesday, July 6, 2022 6:28 AM To: ggreen86/XLSX-Workbook-Class @.> Cc: Subscribed @.***> Subject: [ggreen86/XLSX-Workbook-Class] unable to read & write into xlsx file (Issue #68)
Hi I have a very simple requirement read some cell values from file "packing-list.xlsx" & write same info into file "performa-invoice,xlsx"
I have created a blank form added VFPxWorkbookXLSX class to the form in vfp9 Kindly check attached demo form
I receive return value = 0 when I open workbook sheets
Kindly check demo.zip and give me sample code how to read from excel sheet cells & how to write into invoice file.
Regards Ashish Bhasin @.**@.>
DEMO.ZIPhttps://github.com/ggreen86/XLSX-Workbook-Class/files/9053933/DEMO.ZIP packing-list.XLSXhttps://github.com/ggreen86/XLSX-Workbook-Class/files/9053825/packing-list.XLSX performa-invoice.xlsxhttps://github.com/ggreen86/XLSX-Workbook-Class/files/9053839/performa-invoice.xlsx
— Reply to this email directly, view it on GitHubhttps://github.com/ggreen86/XLSX-Workbook-Class/issues/68, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGWB33POQH6KGLC3MLG3RWDVSVNTNANCNFSM52ZH2JPQ. You are receiving this because you are subscribed to this thread.Message ID: @.***>
Hi Greg Thanks for your prompt responseI made changes as suggested by you, all values were updated in second file without any error But when I opened updated performa-invoice file, it is giving following error " Excel found unreadable content in 'performa-invoice.xlsx', do you want to recover ?if I press yes, i get file with area in black background. I am again sending you following files for your reference - new demo form. - packing-list.xlsx ( source-file, from which values will be read ) - performa-invoice-sample.xlsx ( sample template file ) - performa-invoice.xlsx ( copied from performa-invoice-sample.xlsx ) to be used as target file on which values are to be written here I have supplied you file that I recd after updation of some values .. Thanks & regardsAshish Bhasin
On Wednesday, 6 July, 2022 at 06:09:17 pm IST, ggreen86 ***@***.***> wrote:
Hello--
After you have opened each workbook, you do not need to reopen the workbook again. The method call
lnSh1 = thisform.Vfpxworkbookxlsx1.OpenXlsxWorkbookSheet("D:\TEMP\packing-list.xlsx", "SHEET1")
Opens the workbook a second time. Use the method GetSheetIndex() to get a reference to the sheet; i.e. "SHEET1". Then use the method GetCellValue() to retrieve the value for each cell that you want. Use the method SetCellValue() to set the value into the second workbook sheet. After writing the cell values to the second workbook, use the method SaveWorkbook() to save the changes to the second workbook.
Greg
From: ashishbhasin29 @.> Sent: Wednesday, July 6, 2022 6:28 AM To: ggreen86/XLSX-Workbook-Class @.> Cc: Subscribed @.***> Subject: [ggreen86/XLSX-Workbook-Class] unable to read & write into xlsx file (Issue #68)
Hi I have a very simple requirement read some cell values from file "packing-list.xlsx" & write same info into file "performa-invoice,xlsx"
I have created a blank form added VFPxWorkbookXLSX class to the form in vfp9 Kindly check attached demo form
I receive return value = 0 when I open workbook sheets
Kindly check demo.zip and give me sample code how to read from excel sheet cells & how to write into invoice file.
Regards Ashish Bhasin @.**@.>
DEMO.ZIPhttps://github.com/ggreen86/XLSX-Workbook-Class/files/9053933/DEMO.ZIP packing-list.XLSXhttps://github.com/ggreen86/XLSX-Workbook-Class/files/9053825/packing-list.XLSX performa-invoice.xlsxhttps://github.com/ggreen86/XLSX-Workbook-Class/files/9053839/performa-invoice.xlsx
— Reply to this email directly, view it on GitHubhttps://github.com/ggreen86/XLSX-Workbook-Class/issues/68, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGWB33POQH6KGLC3MLG3RWDVSVNTNANCNFSM52ZH2JPQ. You are receiving this because you are subscribed to this thread.Message ID: @.***>
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
Please attach and send the sample files.
From: ashishbhasin29 @.> Sent: Thursday, July 7, 2022 3:11 AM To: ggreen86/XLSX-Workbook-Class @.> Cc: ggreen86 @.>; Comment @.> Subject: Re: [ggreen86/XLSX-Workbook-Class] unable to read & write into xlsx file (Issue #68)
Hi Greg Thanks for your prompt responseI made changes as suggested by you, all values were updated in second file without any error But when I opened updated performa-invoice file, it is giving following error " Excel found unreadable content in 'performa-invoice.xlsx', do you want to recover ?if I press yes, i get file with area in black background. I am again sending you following files for your reference - new demo form.
On Wednesday, 6 July, 2022 at 06:09:17 pm IST, ggreen86 @.***> wrote:
Hello--
After you have opened each workbook, you do not need to reopen the workbook again. The method call
lnSh1 = thisform.Vfpxworkbookxlsx1.OpenXlsxWorkbookSheet("D:\TEMP\packing-list.xlsx", "SHEET1")
Opens the workbook a second time. Use the method GetSheetIndex() to get a reference to the sheet; i.e. "SHEET1". Then use the method GetCellValue() to retrieve the value for each cell that you want. Use the method SetCellValue() to set the value into the second workbook sheet. After writing the cell values to the second workbook, use the method SaveWorkbook() to save the changes to the second workbook.
Greg
From: ashishbhasin29 @.> Sent: Wednesday, July 6, 2022 6:28 AM To: ggreen86/XLSX-Workbook-Class @.> Cc: Subscribed @.***> Subject: [ggreen86/XLSX-Workbook-Class] unable to read & write into xlsx file (Issue #68)
Hi I have a very simple requirement read some cell values from file "packing-list.xlsx" & write same info into file "performa-invoice,xlsx"
I have created a blank form added VFPxWorkbookXLSX class to the form in vfp9 Kindly check attached demo form
I receive return value = 0 when I open workbook sheets
Kindly check demo.zip and give me sample code how to read from excel sheet cells & how to write into invoice file.
Regards Ashish Bhasin @.**@.>
DEMO.ZIPhttps://github.com/ggreen86/XLSX-Workbook-Class/files/9053933/DEMO.ZIP packing-list.XLSXhttps://github.com/ggreen86/XLSX-Workbook-Class/files/9053825/packing-list.XLSX performa-invoice.xlsxhttps://github.com/ggreen86/XLSX-Workbook-Class/files/9053839/performa-invoice.xlsx
— Reply to this email directly, view it on GitHubhttps://github.com/ggreen86/XLSX-Workbook-Class/issues/68, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGWB33POQH6KGLC3MLG3RWDVSVNTNANCNFSM52ZH2JPQ. You are receiving this because you are subscribed to this thread.Message ID: @.***>
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
— Reply to this email directly, view it on GitHubhttps://github.com/ggreen86/XLSX-Workbook-Class/issues/68#issuecomment-1177177486, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGWB33KILRSQHZMJ3FRRDTDVSZ7IVANCNFSM52ZH2JPQ. You are receiving this because you commented.Message ID: @.***>
closing issue; unable to reproduce
Hi I have a very simple requirement
read some cell values from file "packing-list.xlsx" & write same info into file "performa-invoice,xlsx"
I have created a blank form added VFPxWorkbookXLSX class to the form in vfp9 Kindly check attached demo form
I receive return value = 0 when I open workbook sheets
Kindly check demo.zip and give me sample code how to read from excel sheet cells & how to write into invoice file.
Regards Ashish Bhasin ashish_bhasin29@yahoo.co.in
DEMO.ZIP packing-list.XLSX performa-invoice.xlsx