Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel Automation
Message
 
To
11/09/2000 11:09:24
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00413062
Message ID:
00414949
Views:
41
Ditto to Cetin's reply. If you haven't ordered Tamar's book yet, I highly recommend it. If I'm not mistaken, Hentzenwerke Publishing will give you an online copy of the book as well as the Hard Copy, so you can start using it right away after your purchase. I've only been using OLE Automation for Excel for a few months and the book has been invaluable. In fact, my boss now thinks I'm a genuis for the way I have automated the creation of so many highly formatted spreadsheets that where heretofore created manually. Gee, those accountant types like spreadsheets!!

>There are links in the original spreadsheet. The new spreadsheet (pam.xls) does not save the values that were in the cells. How can I save the spreadsheet so the values will remain?
>
>I am using the following code:
>
>#INCLUDE office97.h
>#INCLUDE xl97cons.h
>SET SAFETY OFF
>
>fname = "E:\SRR\SRRMASTER.xls"
>fname2 = "E:\SRR\PAM.xls"
>COPY file (fname) to (fname2)
>
>ObjExcel=CREATEOBJECT("Excel.Application")
>ObjBook = ObjExcel.WorkBooks.OPEN(fname2)
>ObjBook.Sheets("Grade Sheet").SELECT
>OBJExcel.DisplayAlerts = FALSE
>
>tcSheet = "Grade Sheet"
>
>WITH objExcel.ActiveWorkbook
> .Worksheets(tcSheet).Activate
> .Application.DisplayAlerts = .F.
> FOR each objSheet in .Worksheets
> IF objSheet.Name # tcSheet
> objSheet.Delete
> ENDIF
> ENDFOR
> .Application.DisplayAlerts = .T.
> .Save
>ENDWITH
>
>objExcel.quit()
>RELEASE objExcel
>RELEASE ALL LIKE 'o*'
Michael Helms

May the Schwartz be with you.<(©¿©)> -- Mel Brooks
"Someday, and that day may never come, you will be called upon to perform a service" -- Vito Corleone
"Live like there is no tomorrow, Dance like no one is watching, Love like you've never been hurt." -- Anonymous
"I'm thinking about joining the campaign for shorter tag lines." -- Me
Previous
Reply
Map
View

Click here to load this message in the networking platform