Jump to content

can you import and exit stuff from excel and output to word or pdf and would anyone be willing to help me do this


 Share

Recommended Posts

hello everyone.

sadly i don't know much about autoit or programing in general at all.

i've been told what i am wanting to do is possible in excel but i've not been able to figure out where to start

i know it can be done in access but most of the pc's i use don't have access

so i started to think auto it might be the answer.

i have a few things i am wanting to do but i'll just start with one so to keep this post short

here's what i am looking for in a nutshell to happen when the script is ran.

importing an excel file (from a specific location and name) take the numbers in a column and add some digits to the begining of the number (example; 1234, 2345 goes to 5555-1234 and 5555-2345, and so on)

the it imports a second excel file and does the same thing.

then it takes the merge and edited files and sorts the temp file by two seperate columns.

then it takes and searches two seperate columns for two things

a: for quanity more than 1

b: address the same as prior cell in column

if either of those is correct it pulls this information into i guess another file and after it runs through its first merged file (it can be discarded as we are done with it)

then it takes the informaiton is pulled and

looks at a column for number until the number changes

then it takes all the info for the same number and exports them to a word or pdf file

but its now has to take another excel file that contains a listing of routes and copys the vendor name and drop number to the output

what would be even better is if we could get it to be able to combine mulitple routes on the same pages for the same vendor.

i hope i made this clear, it makes perfect sense to me but i know what i am trying to accomplish.

Link to comment
Share on other sites

AutoIt comes with an Excel and Word UDF (User Ddefined Functions). So it should be possible to do what you want. You have to decide if you want/need to do the processing in Excel (adding columns, sorting etc.) or in 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

to be honest, im not a very good autoit scriptor nor excel for that matter.

but i've used autoit for a few things and really its kinda a good way to get this done.

i have a couple of very very very very simple scripts i've done that just bascially move stuff around but its a one button or file to click to get it done, i like the idea of doing this for what i am looking for.

just have auto it take care of things would be the best option i think.

i just don't know where to begin and stuff

i guess to get it started would be to get it to import one of the excel files and do the addition/replacement of route numbers.

do we think it would be best at that point to then copy/move it all to a new temp file that way when it does the same thing to the second excel file it could just add the rest to the same file.

Link to comment
Share on other sites

There are many ways to skin a cat.

I would start to find the best way to do it manually. Then translate this solution 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

If you know how you would do it manually (without AutoIt) it is easy to translate this steps to AutoIt.

As a starting point: To read an Excel file into an AutoIt array use _ExcelReadSheetToArray

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

For example... I don't know if the new MS Office products can export to a PDF, but a handy little program will allow you to print your document into a PDF file. It's called "PDFCreator" and it's free. Figure out how to print something with the Excel UDF and route it into PDF Creator instead of to the printer.

The other option is to use Libre Office and just export your data to PDF natively without having to install PDFCreator.

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Link to comment
Share on other sites

if you want to create a PDF output then it depends on the Office version you use. I think starting with Office 2007 you can export to PDF.

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

I am the only one that needs a coffee break halfway through that long explanation ?

Some examples, even if just text (code) would have been nice to have.

First part (joining columns) could be done with a simple formula. unless you need to automate this many times, I think it would be faster to do manually in Excel.

Try to describe what you need using small examples. Then choose where to code (excel/VBA or native AutoIT data handling). Then try at least to get something together.

Btw: German forum has a "mit Gegenleistung" area, where you can hire coders. Otherwise, many freelance sites offer AutoIT also.

I am just a hobby programmer, and nothing great to publish right now.

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...