FireFox Posted September 1, 2012 Posted September 1, 2012 (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 November 1, 2013 by FireFox Zoldex, VinMe, mLipok and 1 other 4
FireFox Posted October 19, 2012 Author Posted October 19, 2012 @everybody New version available. (see first post for update) Br, FireFox.
JScript Posted October 19, 2012 Posted October 19, 2012 Although I did not understand anything Excel, thank you for sharing with us! JS http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere!
FireFox Posted October 19, 2012 Author Posted October 19, 2012 (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 October 19, 2012 by FireFox
geometer Posted October 30, 2012 Posted October 30, 2012 I have not tested your udf, but i have seen an other udf from jerome that you can find here (). Would it be helpfull to combine this 2 UDF to one?
FireFox Posted October 30, 2012 Author Posted October 30, 2012 @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.
arqstaad Posted November 1, 2012 Posted November 1, 2012 thank you very much, it is a great job! FireFox 1
yahaosoft Posted November 11, 2012 Posted November 11, 2012 thanks for share the code! FireFox 1 Thanksgiving...
jdelaney Posted October 31, 2013 Posted October 31, 2013 (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 October 31, 2013 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.
FireFox Posted November 1, 2013 Author Posted November 1, 2013 (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 November 1, 2013 by FireFox
jdelaney Posted November 1, 2013 Posted November 1, 2013 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.
mLipok Posted February 14, 2016 Posted February 14, 2016 I was working with this UDF for a while. Here are some links for documentation:OfficeTalk: Dive into SpreadsheetML (Part 1 of 2) Introduction to Excel XML Introduction to Excel XML Part 1: creating a simple table Understanding the Open XML file formats https://en.wikipedia.org/wiki/Microsoft_Office_XML_formats 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 Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now