XSLT and Excel

  • Thread starter Thread starter Fabio Goncalves
  • Start date Start date
F

Fabio Goncalves

Hi Guys,

I do need to transform some excel spreadsheets into xml files through an
automated process.
Is it possible to do it using XSLT? Could anybody give me any direction?


Cheers,

Fabio.
 
Fabio,

Are the Excel sheets in XML format already? If so, then you shouldn't
have to do anything.

If not, XSLT is not going to help you. XSLT can only transform from
XML->XML, XML->Delimited text. It can't transform from/to any arbitrary
format.

What you need to do is automate excel, open the sheet, and then save it
as XML (later versions of excel will allow you to save excel as xml).

Then, you can apply an XSLT to the XML that excel outputs in order to
get the XML in the format you want.

Hope this helps.
 
Hi Nicholas,

I really appreciate your help.

Anyway, due to high volume of incoming files, I wont be able to manually
open excel

and transform then to xml. I am gonna write an application to do this
transformation.


Regards,

Fabio.




Nicholas Paldino said:
Fabio,

Are the Excel sheets in XML format already? If so, then you shouldn't
have to do anything.

If not, XSLT is not going to help you. XSLT can only transform from
XML->XML, XML->Delimited text. It can't transform from/to any arbitrary
format.

What you need to do is automate excel, open the sheet, and then save it
as XML (later versions of excel will allow you to save excel as xml).

Then, you can apply an XSLT to the XML that excel outputs in order to
get the XML in the format you want.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Fabio Goncalves said:
Hi Guys,

I do need to transform some excel spreadsheets into xml files through an
automated process.
Is it possible to do it using XSLT? Could anybody give me any direction?


Cheers,

Fabio.
 
Back
Top