MerleHaggard Posted April 23, 2007 Posted April 23, 2007 I've looked around the forums and in the IE.au3 and I'm still not sure how to begin. I would like to use autoit to generate html pages based on an excel file's cells. I know how to use excel and how to read cells and have autoit move around in excel. I attempted to use a huge send function, but with all the quotes in the source, it wouldn't work. I was going to make a few variables and have those variables put into the text of the source. I was going to have the finished text product pasted into MS word and have it save as html, I know how to do that. My only issue is replacing the various places with the new information. Maybe I should do a string search where it has to match the previous cell perfectly in order to replace the text with the new information. Maybe I would just open up MS word with the text of the page and have use Word's replace tool. Anyone with ideas?
Sokko Posted April 24, 2007 Posted April 24, 2007 Not sure why you'd want to mess around with pasting text into Word when AutoIt has the ability to write out a file directly (check the help file for FileOpen, FileWriteLine, etc). However, I don't quite understand how you have this set up, what you want your script to accomplish, and what exactly you're having trouble with. Could you post the code you have and point out the problem area? Maybe provide an example and explain the "ideal" output?
GEOSoft Posted April 24, 2007 Posted April 24, 2007 MerleHaggard said: I've looked around the forums and in the IE.au3 and I'm still not sure how to begin. I would like to use autoit to generate html pages based on an excel file's cells. I know how to use excel and how to read cells and have autoit move around in excel. I attempted to use a huge send function, but with all the quotes in the source, it wouldn't work. I was going to make a few variables and have those variables put into the text of the source. I was going to have the finished text product pasted into MS word and have it save as html, I know how to do that. My only issue is replacing the various places with the new information. Maybe I should do a string search where it has to match the previous cell perfectly in order to replace the text with the new information. Maybe I would just open up MS word with the text of the page and have use Word's replace tool. Anyone with ideas?Have you looked at_IEDocWriteHTML ? George Reveal hidden contents Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
tAKTelapis Posted April 24, 2007 Posted April 24, 2007 Erm.. open the excel document: file -> save as -> Web Page ??? get the job done the easiest way possible.
MerleHaggard Posted April 25, 2007 Author Posted April 25, 2007 CODE><a href="/filepath/filepath.exe"><img src="../filethumb.jpg" alt="free" width="84" height="63" border="0" lowsrc="/filepath/filepath.exe"></a></p> <p>Download the <a href="/filepath/filepath.exe Here is an example of my html page...I will have multiple pages with the same structure... I will have an excel spreadsheet with the following example data Filepath Thumnailpath width Height Birds Birdsthumb.jpg 75 44 Where autoit will pull the filepath column cell, and replace "filepath" with "birds", replace "filethumb.jpg" with "birdsthumb.jpg, and replace the corresponding width and height accordingly. Therefore making a new web page with the new filepaths to the new files, the new img sources, and the new picture dimensions based on the new cells. I'd imagine it would be some sort of string replace where i would search for the previous cells...and replace with the new cell information?
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