Jump to content



Photo

Saving A Table

csv tables

  • Please log in to reply
3 replies to this topic

#1 sarge

sarge

    Advanced Member

  • Fellow UBotter
  • PipPipPip
  • 34 posts
  • OS:Windows 8
  • Total Memory:< 1Gb
  • Framework:v3.5
  • License:Standard Edition

Posted 09 April 2018 - 01:15 PM

I haven't used Ubot for ages, so I'm a bit rusty, but this problem seems odd to me.

I've scraped data from multiple pages, adding to two lists. One is a product title, the other a description, an example page is here: http://cateringequip...Steamer&cat=242

 

I then add lists as a column to a table, column one and two. The debugger looks fine:

 

04.09.2018-21.12.jpg

 

 

So then I save to file:

 

save to file("C:\\data\\customersData\\catering equipment\\prods\\table.csv",&allscraped)

 

And all I get is this:

 

04.09.2018-21.14.png

 

Only the first line of the description is being saved in the cell.

 

Am I doing something silly here?

 

 

 



#2 bestmacros

bestmacros

    Advanced Member

  • Fellow UBotter
  • PipPipPip
  • 411 posts
  • LocationIsrael
  • OS:Windows 10
  • Total Memory:More Than 9Gb
  • Framework:v4.5+, unsure
  • License:Developer Edition

Posted 09 April 2018 - 02:22 PM

check for commas - CSV is the Comma separated value file - it can split content if you try to save the text with commas


bestmacros.jpg


#3 Code Docta (Nick C.)

Code Docta (Nick C.)

    Member for Hire

  • Fellow UBotter
  • PipPipPip
  • 1482 posts
  • LocationIn a Python or UBot IDE or ubotdocta.com
  • OS:Windows 10
  • Total Memory:More Than 9Gb
  • Framework:v4.5+, unsure
  • License:Developer Edition

Posted 09 April 2018 - 07:23 PM

What happens when you click on a cell? Do you see the rest in the editing bar above?

 

You may have to wrap your text(description) in "Quotes" to make it one string.

 

Or it may be your delimiter. In the menu at the top of UBot there is a "Bot" button, you can change it there.

 

Regards,

CD


UBot Expert Tutorials Store

 

ubot-docta-header-ubot-expert-store.png

 

Python and UBot expert tutorials and documentation


#4 sarge

sarge

    Advanced Member

  • Fellow UBotter
  • PipPipPip
  • 34 posts
  • OS:Windows 8
  • Total Memory:< 1Gb
  • Framework:v3.5
  • License:Standard Edition

Posted 10 April 2018 - 01:41 AM

Hi guys,

 

Checked again, set the delimiter to ';' and that appears to have worked.

 

Thanks!







Also tagged with one or more of these keywords: csv, tables

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users