Jump to content

Recommended Posts

Posted

Just something I put together to incorporate in other programs I've written.

A library for creating a .XML file which can be read into Excel- I needed this to generate output for Excel easily that had colors. Technically it could be changed to do anything you want (different fonts/orientation/etc) but right now it can just set row colors and individual cell colors. Pretty basic and dirty, but it gets the job done for me and I thought I'd share back with the group.

Include it, then

$variablename=XML_Create(<num columns>, <num rows>)

XML_Workbook_SetName($variablename, "Workbook name")

XML_SetType($variablename, column, row, data type)

XML_CellSetData($variablename, column, row, data)

XML_Cell_SetColor($variablename, column, row, color)

XML_Row_SetColor($variablename, row, color name)

XML_Colors() returns array with color names

XML_Write($variablename, filename) writes the xml file

a few other things in there, but this gets the job done (for me anyway) much easier than all the DCOM stuff.

XML.au3

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...