Author: Koen Piller
Posted: 2018-04-16 at 11:35:34
Look for Vilhelm’s blog he has published several procedures for this with
examples
Easy
Regards Koen
Op ma 16 apr. 2018 om 18:33 schreef Peter Cushing <
pcushing@whisperingsmith.com>
> On 16/04/2018 17:17, Desmond Lloyd wrote:
> > Good Morning,
> >
> > Need to be able to copy the contents of a cursor to an Excel file, but
> it
> > needs to be in the xlsx.
> >
> > Am a newbie to Excel Automation and have read that you can saveas, and
> it
> > will save in the latest format. Well mine doesn't. oworkbook.version
> > shows 16. (we are running Office 365)
> >
> > Tried the SweetPotato method but it errors out. Not sure why.
> >
> > Would someone be kind enough to point me in the right direction, with
> some
> > possible examples...
> >
> You can copy the contents of the cursor out to .xls only using the
> standard COPY TO ... TYPE XL5
> Then you can use automation to create an .XLSX file. I'm using office
> 365 but I am on version 15 so slightly older so you should be able to
> create an .XLSX file with your version.
>
> #include include\excel.h
> TRUE=.T.
> FALSE=.F.
> oExcel = CREATEOBJECT('excel.application')
> oExcel.Workbooks.Open(myfile)
> cOutfile2 = 'myfilev2.xlsx'
> objexcel.ActiveWorkbook.SaveAs(cOutfile2, xlOpenXMLWorkbook)
>
>
> In excel.h xlOpenXMLWorkbook is 51
>
> HTH,
>
> Peter
>
>
> ,"This communication is intended for the person or organisation to whom it
> is addressed. The contents are confidential and may be protected in law.
> Unauthorised use, copying or disclosure of any of it may be unlawful. If
> you have received this message in error, please notify us immediately by
> telephone or email.
>
> www.whisperingsmith.com
>
> Whispering Smith Ltd Head Office:61 Great Ducie Street,
> <https://maps.google.com/?q=h+Ltd+Head+Office:61+Great+Ducie+Street,&entry=gmail&source=g>
> Manchester M3 1RR.
> Tel:0161 831 3700
> Fax:0161 831 3715
>
> London Office: 101 St. Martin's Lane,London, WC2N 4AZ Tel:0207 299 7960
>
>
>
>
[excessive quoting removed by server]
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/CACUu1Sv92-4MD1aSHJP2Gx0XDAtY4AfAKRKg4fAY-2ynfDk0hA@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.