Export to Excel

With the recent changes to Office 2003 SP3 (not liking files of .wk?)

I’m looking to rewrite my export to excel Action Buttons. Up to now I’ve been pretty lazy on views and just done the following:

@Command([FileExport];“Lotus 1-2-3”;“c:\123temp.wk4”);

@Command([ToolsRunMacro];“(Create LS Excel)”)

The macro does nothing more than:

filepath = Inputbox$(“Please enter where you would like the file to be saved and it’s name, eg. c:\temp\export.xls”)

Set xlapp = createobject(“Excel.application”)

xlapp.visible = True

xlapp.workbooks.open “C:\123temp.wk4”

xlapp.ActiveWindow.displaygridlines = True

xlapp.Rows(“1:1”).Select

xlapp.Selection.Font.Bold = True

xlapp.cells.select

xlapp.selection.Font.Name = “Arial”

xlapp.selection.Font.Size = 9

xlapp.selection.columns.Autofit

xlapp.referencestyle = 2

xlapp.Range(“A1”).Select

Const xlWorkbookNormal = -4143

xlapp.activeworkbook.saveas filepath, xlWorkbookNormal, , , , True

kill “C:\123temp.wk4”

I would like to develop somethig much nicer where, the user can open a standard windows file window to select the location and if possible create the 1-2-3 file instead directly writing to excel.

I’m sure I can write something, but I thought I would ask if anyone else has already done this and willing to share? Is there something in the Sandbox or OpenNTF than I may have missed?

Thanks.

Subject: Export to Excel

I’ve been basically accomplishing this one by explicitly exporting to a tab delimited text file (using Print statements, with Chr(9) as the tab separator), then going through the same xlapp steps to open and resave as an xls.

Subject: RE: Export to Excel

Stephen,

I sent you some code that may help you out.

Cheers,

John

Subject: Export to Excel

You can “fix” the “helping hand” that M$ introduced with SP3 in Office 2003 and above.

http://support.microsoft.com/kb/938810/

See Method 3. Just take note that you HAVE to enter the specified registry keys. They’ll default to the correct DWord of 0 but the keys MUST be in the registry.

Subject: RE: Export to Excel

Thanks, Yes I was aware of this, but from what I’m reading it sounds like this will be an issue with Office 2007 without a fix. Therefore, I’ve decided to spend a bit of time looking at alternative and develop something better than I have now.

Subject: Export to Excel

Stephen,

If you send me an email, I’ll send along some code that may help you.

You can get my email by clicking on my name or send

jburagas &&&& %%%% @ %%%% verizon.net

and then remove the & and %.

John