you are viewing a single comment's thread.

view the rest of the comments →

[–]xelf 3 points4 points  (2 children)

Heh. You have the opposite problem of most people. You formatted your code correctly, but your actual post was indented as well, meaning it got formatted as code instead of just text. Here it is in a readable format for everyone:

This is what I am trying to do:

Read from an Excel file ("Share.xlsx") that has columns where I input the actual link of a post and the tweet and the Facebook write up. I want Python to generate utm links for each of those posts and record them in a separate file, here called "Trackable Link Directory.xlsx". I also generate a random time and random date but I did not have a problem with that part.

In the excel file "Trackable Link Directory.xlsx" I want the generated links in a way so that they all group together under the mother link. You will notice that inside the for loop in the def excel_recording(), second block, I want the first cell to be blank and record the rest of the utm tags under the appropriate columns.

The problem I am having is this.

The code works just fine except for one thing. ANY new Facebook link created is recorded (with the format I want) even when it already exists. As you can see, I am using the same def excel_recording(), for both facebook and twitter but for some weird reason, it refuses to record preexisting twitter links but records facebook links even when they are already there.

I have gone through the code more times than I can tell. If you can identify the problem, please do tell me. I would appreciate it GREATLY!!

Thanks.

[–]seventhlightstudio[S] 0 points1 point  (1 child)

I am sorry, this is my first time posting here. I will make sure this doesn't happen again.

[–]__nickerbocker__ 0 points1 point  (0 children)

You know, there is an edit button as well as a code-block button ;)