View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
[email protected] crferguson@gmail.com is offline
external usenet poster
 
Posts: 91
Default File format conversion on server

How about this: prior to actually creating the Excel file (assuming
that's the "Office 2007 files" you're talking about since you're
posting to an Excel group), have the user select the format they
want. Then use a conditional statement to save the Excel file in the
format you want. Of course, this suggestions makes a lot of
assumptions since you posted no code. For example I assume your using
an Excel.Application object. Something like the untested code he

Private Sub SaveBook(sVer As String)
Dim e As Object
Dim w As Workbook

Set e = CreateObject("Excel.Application")
Set w = e.Workbooks.Add

Select Case sVer
Case "12.0"
w.SaveAs "C:\Temp\FileName.xls", xlExcel12
Case Else
w.SaveAs "C:\Temp\FileName.xls", xlExcel8
End Select

w.Close
Set w = Nothing
Set e = Nothing
End Select
End Sub

On Sep 27, 7:02 am, Richard Bond wrote:
I am producing office 2007 files (with no macros) directly on a webserver
from .net. I was then going to rely on users having the compatibility pack on
their machines to convert to whatever version of office they have. My boss
has now changed his mind and said that we should be able to give our users
the choice of formats. Is there recommended way of programmatically
converting from office 2007 format to say office 2003 format on a server?????
Is OMPM using the ofc appropriate for this environment?

regards,

Richard