JJ,
clearly from the responses, you have a number of options. I thought
I'd add another possible option.
We use Cache Activate (Tools -> Add Ins -> Activate Wizard from the
Studio) to create Cache wrapper classes for Excel and then manipulate
files in Excel prior to loading into Cache.
We are doing the opposite of what you need to do - taking Excel format
files and saving as tab delimited output, but the reverse process
should be possible. The code below is a simple set of commands to take
in a file and re-save as tab delimited:
// Create a new instance of an Excel application
s obj=##class(Activate.Excel.Application).%New()
s obj.DisplayAlerts = 0
// Open a workbook at the location specified
s res=obj.Workbooks.Open(txtFilename)
// you now have access to the workbooks collection object
// e.g. "w obj.Workbooks.Count"
// Get the first worksheet in the worksheets collection
s ws=res.Worksheets.ItemGet(1)
// The worksheet is an IDespatch object and needs to be cast
// as a full Excel Worksheet object using "Become"
s wso=ws.Become("Activate.Excel.Worksheet")
// Use the Worksheet SaveAs method to save as a tab delimited text
file
// (constant xlTextWindows value 20)
do wso.SaveAs(newfilepath,20)
// etc ...
I hope that helps
Steve Richards