My boss wants me to write a program that takes a file with his list of published works (could be Excel or Word doc...I figured Excel would be easier), searches them on Google Scholar, then returns the "Cited by:" number for each paper.

Thank you for the code, I'm about to try it out...however, the main problem I'm having is combining results like these with a script that opens up an Excel file with a list of papers to search for, and then scrapes Google Scholar and returns the number of citations to a column in the Excel sheet.

I've written code that does both of these separately, but I can't seem to combine them. I'd post the code if needed, but I'm not sure it's worth it

Let's now write another script that will read entries from Excel file, call scholar.txt script and write results back to the excel file, one by one. We will assume the excel file has the search title in the first column, it is tab-separated, and is at C:\X.txt.

Code

# Script excel.txt

# Read excel file.

var str input, output ; cat "C:\X.txt" > $input

# Process entries one by one.

while ($input <> "")

do

var str entry ; lex "1" $input > $entry

var str count ; script scholar.txt title($entry) > $count

set $output = $output+$entry+"\t"+$count+"\n"

done

# The updated output is in $output. Write it back.

echo $output > "C:\X.txt"

Save this script as C:\Scripts\excel.txt. Start biterscripting, enter the following command.

Code

script excel.txt

When the script has completed running, the results will be in X.txt. Open X.txt with excel, or print it.

This time, I have not been able to test. So, test first.

If you improve upon these scripts, do post them back. There is a value in them. There is always a value in automating something that one would otherwise need to do manually - typing, clicking, reading, entering - item by item by item.