Extract to specific cells in excel

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information:CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
joshrt24
Posts: 2
Joined: Fri Jun 02, 2017 12:18 am

Extract to specific cells in excel

Post by joshrt24 » Fri Jun 02, 2017 12:33 am

TAG POS=5 TYPE=A ATTR=TXT:* EXTRACT=txt
SAVEAS TYPE=EXTRACT FOLDER=* FILE=test.csv


Gives extract perfectly and confirm in popup box. Only it places the extract in the A2 column in excel. For example I need it to go to F20 and next time I run it, I need it to over write f20 again. Ultimately just always be in that specific cell. I have googled and googled and surprisingly do not see anyone else requesting this feature?

Any help would be appreciated.

I tried adding SET !EXTRACT {{!COL6} but that did not help.

I am using firefox 53.0.3
9.0.3 Imacro for firefox.
Win10 english
no other issues with imacros or any other macros ive been using.
chivracq
Posts: 8143
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Extract to specific cells in excel

Post by chivracq » Fri Jun 02, 2017 4:56 am

joshrt24 wrote:

Code: Select all

firefox 53.0.3
9.0.3 Imacro for firefox.
Win10 english

Code: Select all

TAG POS=5 TYPE=A ATTR=TXT:* EXTRACT=txt
SAVEAS TYPE=EXTRACT FOLDER=* FILE=test.csv
Gives extract perfectly and confirm in popup box. Only it places the extract in the A2 column in excel. For example I need it to go to F20 and next time I run it, I need it to over write f20 again. Ultimately just always be in that specific cell. I have googled and googled and surprisingly do not see anyone else requesting this feature?

Any help would be appreciated.

I tried adding SET !EXTRACT {{!COL6} but that did not help.

I am using firefox 53.0.3
9.0.3 Imacro for firefox.
Win10 english
no other issues with imacros or any other macros ive been using.
No need to open to open Duplicates when you want to open a Thread on this Forum... :idea:

"... it places the extract in the A2 column in excel."
=> Euh..., it should place it in the A1 Cell in Excel, unless you have some other 'EXTRACT' before the 2 Lines of Code you post...

But to answer your Qt about your "F20 Cell", 'SAVEAS TYPE=EXTRACT' will never overwrite (a "Cell" in) your existing '.CSV', it will only append the Data to the File, and this is by Design.

'F20' Cell is Row_20 + Col_6, pfff, that's pretty in the "middle" of your Sheet, ah-ah...!
If you want to overwrite only one Cell, you would need to retrieve the whole Content of your '.CSV' File, store it in some Temp Var(s) in iMacros, delete your File (with 'FILEDELETE'), and then recreate your File and save again Row by Row the whole Content and making sure that for Row_6 you include your new Extract... A little bit cumbersome in your Case I would think, if you ask me...!

Maybe more practical would be if you opened/accessed your '.CSV' in GoogleDocs (in a 2nd Tab), then you can directly access/update a specific Cell... :idea:
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
joshrt24
Posts: 2
Joined: Fri Jun 02, 2017 12:18 am

Re: Extract to specific cells in excel

Post by joshrt24 » Fri Jun 02, 2017 10:56 pm

chivracq wrote:
joshrt24 wrote:

Code: Select all

firefox 53.0.3

no other issues with imacros or any other macros ive been using.[/quote]
No need to open to open Duplicates when you want to open a Thread on this Forum...  :idea: 

"... it places the extract in the A2 column in excel."
=> Euh..., it should place it in the A1 Cell in Excel, unless you have some other 'EXTRACT' before the 2 Lines of Code you post...

But to answer your Qt about your "F20 Cell", 'SAVEAS TYPE=EXTRACT' will never overwrite (a "Cell" in) your existing '.CSV', it will only append the Data to the File, and this is by Design.

'F20' Cell is Row_20 + Col_6, pfff, that's pretty in the "middle" of your Sheet, ah-ah...!
If you want to overwrite only one Cell, you would need to retrieve the whole Content of your '.CSV' File, store it in some Temp Var(s) in iMacros, delete your File (with 'FILEDELETE'), and then recreate your File and save again Row by Row the whole Content and making sure that for Row_6 you include your new Extract... A little bit cumbersome in your Case I would think, if you ask me...!

Maybe more practical would be if you opened/accessed your '.CSV' in GoogleDocs (in a 2nd Tab), then you can directly access/update a specific Cell...  :idea:[/quote]

How very typical to get nothing more than a smart ass response, particularly from you as every thing you post is negative and condescending. I was thinking this might be a good forum to learn and share ideas but it looks like I am just like all the others and simply get mocked for trying and expressing an idea or interest in something. You give information but not until after your bull shit thoughts on the situation.

Aside of that, thanks for letting me know that imacros can not do what I hoped it would. 

I did need something to go into f20, yes its in the middle of the sheet, and for a reason.. brace your self but.. there is other content in the sheet that takes up the other area and ...... wait for it... thats on purpose! I don't want to have separate forms and documents for this, that's not my plan at all. 

Oh well. On to something else.
chivracq
Posts: 8143
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Extract to specific cells in excel

Post by chivracq » Sat Jun 03, 2017 3:29 am

joshrt24 wrote:How very typical to get nothing more than a smart ass response, particularly from you as every thing you post is negative and condescending. I was thinking this might be a good forum to learn and share ideas but it looks like I am just like all the others and simply get mocked for trying and expressing an idea or interest in something. You give information but not until after your bull shit thoughts on the situation.

Aside of that, thanks for letting me know that imacros can not do what I hoped it would.

I did need something to go into f20, yes its in the middle of the sheet, and for a reason.. brace your self but.. there is other content in the sheet that takes up the other area and ...... wait for it... thats on purpose! I don't want to have separate forms and documents for this, that's not my plan at all.

Oh well. On to something else.
Oh yeah...!, sounds like sbd had a bad day in the Office, or didn't get their candy in the supermarket, ah-ah...! :shock:

"... imacros can not do what I hoped it would..."
=> Well, not directly, and that's by Design, or at least it's documented in the Wiki, there has been an EnhReq for years already about it, feel free to bump it, that will be more useful than your strange Reaction...
And I gave you 2 Ways/Workarounds to still achieve what you want, and there are probably other ways as well, from a '.vbs' Script from example...
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
Post Reply