Jump to content

Recommended Posts

Posted (edited)

Update :

Version 1.0.0.1
Optimized whole code, added redim step var.

Hi,
I had to create Excel files for my needs, but I wondered how to do it because xlsx files are not raw editable; so I searched for a way do it.

Excel can open multiple files type, and the XML is a good way to do it so here it is.

It creates an Excel XML file, with which you will be able to :
-Create Rows
-Create Cells and set it's color
-Set column width
-Set global text horizontal align
-Set XML author
-Set XML creation date
-Set XML compagny

And of course you can easily add features.

Here is an example :

#include "Excel_XML.au3"

$iRow = _ExcelXML_Row_Add()

_ExcelXML_Column_SetWidth(1, 100)
_ExcelXML_Cell_Add($iRow, "Row 1, Cell 1")

_ExcelXML_Column_SetWidth(2, 200)
_ExcelXML_Cell_Add($iRow, "Column width set to 200px")

$iRow = _ExcelXML_Row_Add()
$iCell = _ExcelXML_Cell_Add($iRow, "Cell color red")
_ExcelXML_Cell_SetColor($iCell, 0xFF0000)

_ExcelXML_Cell_Add($iRow, "Excel XML UDF")

$hFile = FileOpen(@ScriptDir & "\Excel_XML test.xml", 2)
FileWrite($hFile, _ExcelXML_Assemble())
FileClose($hFile)

_ExcelXML_Destroy()

And what you are waiting for : Excel_XML.au3
(Previous : 53 downloads)

Enjoy !

Edited by FireFox
  • 1 month later...
Posted (edited)

@JScript

You're welcome ! :)

I have some ideas, but It will take time to realize them, and I have not so much time for the moment.

Br, FireFox.

Edited by FireFox
Posted

@geometer

oh, I did not know this one.

Since his does more than mine, I don't see how it can be possible to combine them. Furthermore I make my projects by myself and this UDF must remain simple.

Br, FireFox.

  • 2 weeks later...
  • 11 months later...
Posted (edited)

Awesome, I just realized, recently, all the ways to read/write excel without the app...I think that there could be some major improvements using object microsoft.xmldom...I'll look into this later, but great example.

Edited by jdelaney
IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Posted (edited)

jdelaney,

Thanks, if you find a way to work with the xmldom object then create a new topic to post your UDF :)

You can link it here if you want.

Br, FireFox.

Edited by FireFox
Posted

all set: '?do=embed' frameborder='0' data-embedContent>>

I'm having some namespace issues...where new cells and rows, when you load a file, include empty namespaces, causing excel to not display their data...outside of that, the basics are there

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
  • 2 years later...
Posted

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

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
×
×
  • Create New...