Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 31 Oct 2019, 15:38
Zweeper Zweeper is offline
 
Join Date: Jan 2005
Excel 2 Forum

Good day everybody,

I have an excel file with different rows and I want to create threads with content out of each row.
Is there already something like a phyton script available for this?

If not, can you give me some tipps and advice to start off how I could cope with something like this?
Maybe there is even a coder who could code something like this in python for me?


Greetings!
Reply With Quote
  #2  
Old 31 Oct 2019, 15:52
Dave Dave is offline
 
Join Date: Jun 2010
Real name: Dave
Is there a reason you want to use Python even though vBulletin 5 is created using PHP?

Using PHP you can read the Excel file and iterate through each row and then insert the thread.

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com

Contact me for custom vBulletin 3/4 work & server/website management.
Reply With Quote
  #3  
Old 31 Oct 2019, 15:53
Zweeper Zweeper is offline
 
Join Date: Jan 2005
no, just because I am more into python at the moment.
Thanks already for the script. But how can I tell it to get the data from my excel exactly? Is there an example?

--------------- Added 31 Oct 2019 at 16:34 ---------------

The excel file is structured as


colum 1 = title
colum = thread content


there are x rows whereby each row should be a different thread.
I understand the code you wrote there, but I dont get how I can link this to an excel file.



Can you help me here?

--------------- Added 31 Oct 2019 at 18:42 ---------------

It hasnt necessarly to be excel 2 vbulletin. Right now I just have all the data in an excel file.

Last edited by Zweeper; 31 Oct 2019 at 16:00.
Reply With Quote
  #4  
Old 02 Nov 2019, 13:00
Zweeper Zweeper is offline
 
Join Date: Jan 2005
I came a bit closer to the solution I guess, got some help from another guy regarding the importing problem from a csv file. But I can't get it working.


Anyone, any help here?







Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #5  
Old 02 Nov 2019, 13:40
Dave Dave is offline
 
Join Date: Jun 2010
Real name: Dave
Something like:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

You still need to modify the parentid and userid value.
Pretty sure the script you gave is not valid though because it calls the $rowfields variable which does not exist.
__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com

Contact me for custom vBulletin 3/4 work & server/website management.
Reply With Quote
  #6  
Old 02 Nov 2019, 14:08
Zweeper Zweeper is offline
 
Join Date: Jan 2005
thanks, I finally got it working. Many thanks 2 you!

Last edited by Zweeper; 02 Nov 2019 at 17:54.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 09:12.

Layout Options | Width: Wide Color: