Focal Point
Can you preserve a macro by appending to an excel spreadsheet

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/7981065232

June 14, 2007, 05:02 PM
mgd
Can you preserve a macro by appending to an excel spreadsheet
I have a spreadsheet that formats a character in my FEX output to an Alt+Enter to force carriage-returns in the cells. If I saved this macro to an "empty" spreadsheet and wrote (APPEND? my weekly updates to this file, could I preserve and thus use, my macro? If so, please do tell ...Thanks
June 14, 2007, 05:18 PM
Tony A
I don't believe that you can do that, however you can create your Excel file as a Web archive (.mht) and then save your output to that. There are several posts that tell you how.

One thing to remember is that the Web archive must have at least two worksheets within it. I use this method to control all the formatting of a worksheet including print areas, zoom levels, borders, column widths etc. etc. I follow all the formatting up with a deletion of the worksheet that is not required so that the final Excel workbook has only the one sheet.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
June 15, 2007, 09:03 AM
mgd
Thank-you for the suggestion. Do you have any sample code I could see? Im currently on v 5.2.4 do you know if the method you're referring to would be supported in my version?
June 15, 2007, 09:27 AM
Tony A
You need version 7.1 to be able to take advantage of Excel templates (web archives).

For examples use the find function and search on "web archive".

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10