Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Apply a transform on export with Excel

Status
Not open for further replies.

prgmrgirl

Programmer
Feb 12, 2004
119
US
Howdy everyone,

We have a spreadsheet with lots of data. It has a schema and can be imported/exported just fine. However, I would like to apply a transform to the data on export. Basically, I'd like to pull only some of the records into xml based on a criteria I define. For example, on export I want to only export records where State='WI'.

Is there a way to transform the data before export?

Thanks!
prgmrgirl
 



Hi,

MS Query via Data/Get External Data...

Using MS Query to get data from Excel faq68-5829

Skip,

[glasses] [red][/red]
[tongue]
 
Hi Skip,

Unfortunately, the way that this data is set up doesn't meet the criteria for using MSQuery. The data is in an Excel list and has an attached schema. We want to be able to pull this data out as XML for reuse in other areas. What I would like to be able to do is apply an xslt to the xml data on export. I have the xslt written and ready to boogie. Just not sure if there's a way to apply it, either using the regular menus in Excel or via vba in the BeforeXMLExport event.

Thanks guys!
prgmrgirl
 
Wow, that was fast! LOL

Well, the data is in an Excel list (that is mapped to a schema). However, there are other things on the spreadsheets that we don't want to pull. In order to use MSQuery, I believe the data has to be structured as a table with nothing else on the sheet but the data.

I was really hoping there was some easy way of doing this,like

Code:
Sheet(1).ApplyTransform("myTransform.xslt")

I don't suppose there's any built in method in Excel like that? LOL


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top