Jump to content

Excel layout


Recommended Posts

Hi all,

I'm using AutoIT for tree weeks now and I made a program that export data to a excel sheet. I am curious if there is a possibility that my data is placed into a table with colors, and many of this tings.

Thank you!

 

Link to comment
Share on other sites

Welcome to Autoit and the forum!

Sure this is possible. Unfortunately the Excel UDF that comes with AutoIt (or my rewrite of the UDF) do not provide many functions to format data.

I suggest:

  • Start the macro recorder in Excel
  • Do all the formatting you need
  • Post the created VBA macro and I will help to translate it to AutoIt

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Hi water,

I don't know what to do, I will explain my dream to you, maybe you can help me:

My plan is to make a checklist program with a GUI. A guy called SDK made a script and I used and changed it a little bit. (I added this script here)

So if you start the program you will see a Graphic Interface. On the menu tab I can add a new checklist and answer some question. When I am finished I go back to Menu and save/export this to an excel file.

Okay here we go, the checklist have to be saved with a nice layout, not plain text. I added a file: layout.xlsx ,and my wish is that the exported checklist has the layout of that file. I also made a macro where you asked for. So, everytime you make a checklist and export this, there must be automatic made a new excel file with the data of the checklist  and in the layout of 'layout.xlsx'.

I'm sorry for my bad English :P, but do you understand me?

Can you help me with this, I am working on this for four weeks now, and it's really drives me crazzy :P

Thank you water,

Ciao ;-)

test.au3

macro.txt

layout.xlsx

Edited by erikkn
Link to comment
Share on other sites

I would open layout.xlsx as a template, insert the data from your GUI in colums B and C and then save the workbook with a different name.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Download my rewrite of the Excel UDF.

Thi is an untested example:

$oExcel = _Excel_Open()
$oWorkbook = _Excel_BookOpen($oExcel, "C:\temp\layout.xlsx")
_Excel_RangeWrite($oWorkbook, $oWorkbook.ActiveSheet, $aTable1, "B3") ; Write first part
_Excel_RangeWrite($oWorkbook, $oWorkbook.ActiveSheet, $aTable2, "B10") ; Write second part
_ExcelBookSaveAs(...)
_Excel_BookClose($oWorkbook)
_Excel_Close($oExcel)

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Sure :)

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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