0

Me and my group are currently working on a school project where we need to use an online python compiler, since we are not allowed to install or download any software on their computers. The project requires me to read data from a .xlsx file.

Is there any online IDE with xlrd that can read the file that is on the school's computer?

I've been looking at a few but can't seem to find any that has this support. On tutorialspoint.com it is possible to upload the excel file but not import xlrd. Other sites has xlrd but doesn't allow for uploading files to the site.

jonrsharpe
  • 115,751
  • 26
  • 228
  • 437

3 Answers3

1

You could look into Cloud9 for online IDE. It wouldn't have access to your computer's filesystem, but you could either:

  • Build a tiny flask web app that exposes a website with an upload form. You could upload your file through the form, and have the backend use xlrd to do whatever you need.
  • Straight up upload your file to your C9's workspace, via C9's interface itself.

You can most definitely install xlrd on C9.

Luis Alvarez
  • 674
  • 6
  • 8
  • Thanks! I tried cloud9 and it seem to do the trick. The application we are trying to run is pretty CPU intensive and CPU usage is a restriction at the site. I hope it will run anyways. I'll keep the other advice in mind. – Good ol' George Jun 22 '17 at 14:14
0
  1. Could the pandas package and its pandas.read_clipboard function help? You'd need to copy the content of the file manually to the clipboard before starting your script.

  2. Alternatively - is it considered cheating to just rent a server? Pretty cheap these days.

  3. Finally: you don't usually require admin rights to install Python... so assuming it's not a violation of school policy, the Anaconda distribution for instance is very happy to be installed for the local user only.

Paul Roub
  • 36,322
  • 27
  • 84
  • 93
alex314159
  • 3,159
  • 2
  • 20
  • 28
-2

import tabula

Read a PDF File

df = tabula.read_pdf("file:///C:/Users/tanej/Desktop/salary.pdf", pages='all')[0]

convert PDF into CSV

tabula.convert_into("file:///C:/Users/tanej/Desktop/salary.pdf", "file:///C:/Users/tanej/Desktop/salary.csv", output_format="csv", pages='all') print(df)