Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #6442 > unrolled thread
| Started by | H_Fidler@yahoo.com |
|---|---|
| First post | 2013-12-22 00:15 -0800 |
| Last post | 2013-12-22 19:22 +0000 |
| Articles | 4 — 4 participants |
Back to article view | Back to comp.lang.clipper.visual-objects
Read Excel file H_Fidler@yahoo.com - 2013-12-22 00:15 -0800
Re: Read Excel file George Tritsos <GeorgeTritsos@yahoo.gr> - 2013-12-22 05:53 -0800
Re: Read Excel file JohnMartens <martens@tennishulp.info> - 2013-12-22 17:49 +0100
Re: Read Excel file Carlos Rocha <FreeTheMusic@ascap.com> - 2013-12-22 19:22 +0000
| From | H_Fidler@yahoo.com |
|---|---|
| Date | 2013-12-22 00:15 -0800 |
| Subject | Read Excel file |
| Message-ID | <c31a7f20-19ae-428c-a21e-d94ba61b66b0@googlegroups.com> |
I try to open and read few excel files:
H11_ is the prefix when I set up the OLE control "Microsoft Office Spreadsheet 11.0"
oExcel := OLEAutoObject{"Excel.Application.11"}
oExcel:Visible := true
oBooks:=H11_Workbooks{oExcel:WorkBooks }
oBooks:Open("C:\Schmuck\eBay\eBay 15 28.10.xls")
oBooks:Open("C:\Schmuck\eBay\eBay 14 28.10.xls")
oBook := H11_Workbook{oBooks:[Item,2]}
oSheets := H11_Worksheets{oBook:Worksheets} // ERROR in Function WorkSheets
member not found.
1. How can I know how many oBook are there in oBooks?
oBooks:Count does not return.
2. How to build oSheets? How many oSheet are there in oSheets?
3. Where can I see the class structure?
Many thanks
Henry
[toc] | [next] | [standalone]
| From | George Tritsos <GeorgeTritsos@yahoo.gr> |
|---|---|
| Date | 2013-12-22 05:53 -0800 |
| Message-ID | <49ae7892-f204-4e5f-af3d-945347e75b32@googlegroups.com> |
| In reply to | #6442 |
Hi Henry,
I use this:
oExcel:=OLEAutoObject{"Excel.Application"}
oExcel:DisplayAlerts:=FALSE // TRUE = Display messages from excel
oExcel:Visible:=FALSE // Hide excel application run.
oExcel:DisplayFullScreen:=TRUE // execute FULL SCREEN
oWorkBooks:=oExcel:Workbooks // Create workbook
oWorkBooks:add("MyExcelFile.xls") // load file to workbook
oWorkSheet:=oExcel:ActiveSheet // active the current sheet
or
oSheets:=oExcel:Sheets
oWorkSheet:=oSheets:[Item,"MyNameSheet"]
oWorkSheet:Activate() // activate the Mynamesheet
oRange:=oWorkSheet:[Range,"E2","E2"] // choose E2
oRange:SELECT() // Select the range
oRange:FormulaR1C1:="My value" // to write in E2
mycell:=AsString(oRange:Value) // to read from E2
I hope this helps you
Regards
George
[toc] | [prev] | [next] | [standalone]
| From | JohnMartens <martens@tennishulp.info> |
|---|---|
| Date | 2013-12-22 17:49 +0100 |
| Message-ID | <l9757a$951$1@dont-email.me> |
| In reply to | #6442 |
If you do not have a clue what structure the XLS has, how do you want to
read the data you need ?
H_Fidler@yahoo.com schreef op 22-12-2013 9:15:
> I try to open and read few excel files:
> H11_ is the prefix when I set up the OLE control "Microsoft Office Spreadsheet 11.0"
>
> oExcel := OLEAutoObject{"Excel.Application.11"}
> oExcel:Visible := true
>
> oBooks:=H11_Workbooks{oExcel:WorkBooks }
> oBooks:Open("C:\Schmuck\eBay\eBay 15 28.10.xls")
> oBooks:Open("C:\Schmuck\eBay\eBay 14 28.10.xls")
>
> oBook := H11_Workbook{oBooks:[Item,2]}
> oSheets := H11_Worksheets{oBook:Worksheets} // ERROR in Function WorkSheets
> member not found.
>
> 1. How can I know how many oBook are there in oBooks?
> oBooks:Count does not return.
>
>
> 2. How to build oSheets? How many oSheet are there in oSheets?
>
> 3. Where can I see the class structure?
>
> Many thanks
> Henry
>
[toc] | [prev] | [next] | [standalone]
| From | Carlos Rocha <FreeTheMusic@ascap.com> |
|---|---|
| Date | 2013-12-22 19:22 +0000 |
| Message-ID | <l97e57$ei6$1@news.albasani.net> |
| In reply to | #6442 |
H_Fidler@yahoo.com laid this down on his screen : > > 1. How can I know how many oBook are there in oBooks? > oBooks:Count does not return. > Try oExcel:Workbooks:Count -- Carlos Rocha
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.clipper.visual-objects
csiph-web