Questions tagged [pyexcel]

Use this tag when discussing issues related to `pyexcel`, a Python package designed to provide a single API for working with various Excel-related file formats.

pyexcel is a Python "wrapper" package, designed to provide a single API for working with various Excel-related file formats. It relies on several other, more specialized Python packages to handle each of the supported formats.

94 questions
8
votes
2 answers

pyexcel export error "No content, file name. Nothing is given"

I'm using django-pyexcel to export data from the website, but when I go to the export URL I get the error: Exception Type: IOError Exception Value: No content, file name. Nothing is given The code to export the data was copied from the example…
Tony
  • 9,672
  • 3
  • 47
  • 75
7
votes
3 answers

Write Dataframe into ODS format

I am reading a .xlxs file using pandas library and extracting the dataframe. Now I am trying to create a file with .ods extension and write the dataframe into it using pyexcel_ods library. Here is my code :-- import pandas as pd from pyexcel_ods…
Soham
  • 4,397
  • 11
  • 43
  • 71
4
votes
2 answers

how to read xlsx as pandas dataframe with formulas as strings

I have a excel file with some calculated columns. for example, I have some data in columns 'a' and column 'b' is calculated using values in column 'a'. i need to append new data to column 'a' and calculate column 'b' and save the file. import pandas…
Gowtham M
  • 349
  • 3
  • 18
4
votes
1 answer

How to create a file in memory (not an uploaded file) and save to FileField through Django default_storage?

If I was to create a file-like csv object in memory like so: output_stream = io.StringIO() sheet = pyexcel.get_sheet(records=data) sheet.save_to_memory(file_type='csv', stream=output_stream) What can I do to save the file like object in…
coler-j
  • 1,791
  • 1
  • 27
  • 57
3
votes
1 answer

My exe. file created from pyinstaller doesn't work like it does when it was .py (Pyexcel problem)

This is my first question I am using pyexcel in my python(3.7.4) script and it worked well. However after creating an exe file using Pyinstaller my exe file cannot run as it was .py Here is the error while the program is running: (These problem…
k54126
  • 31
  • 4
3
votes
4 answers

return a created excel file with flask

I am creating a excel file using openpyxl which I would like to return as a file download (so not saving locally). I can create the excel file fine and save it to disk. However, I cannot get this file to download. Attempt 1: import flask_excel as…
Mike
  • 3,775
  • 8
  • 39
  • 79
2
votes
1 answer

pyexcel get_book and get_records functions throw exceptions for XLSX files

I'm trying to open an XLSX file using pyexcel. But it fails for both get_book and get_records with the following error. However if I try to read the same file converted to xls it does work. I get the files uploaded by users: so can not restrict…
Indika Rajapaksha
  • 1,056
  • 1
  • 14
  • 36
2
votes
2 answers

How to write the data to an excel using python

Im writing the data inside my dictionary to an excel which looks like below my_dict = { 'one': 100, 'two': 200, 'three': 300} df = pd.DataFrame(my_dict.items(), columns=['Summary','Count']) with pd.ExcelWriter('outfile.xlsx') as writer: …
Mr.B
  • 51
  • 6
2
votes
2 answers

Python - 'No suitable library found for ods' Pyinstaller

I wrote a script that opens and fetches values from .ods file and creates a new sheet and writes values using pyexcel and pyexcel_ods3 . After converting into an executable I get this error No suitable library found for ods . Code : sheet =…
Guhan
  • 21
  • 2
2
votes
0 answers

How to import excel file into SQL Alchemy?

I have this code to import Excel data into SQLlite, but wondering how to do it into SQLAlchemy instead, without naming the fields manually. Am not sure how to create the fields and schema automatically from Excel column fields in SQLAlchemy. con =…
tensor
  • 3,088
  • 8
  • 37
  • 71
2
votes
1 answer

Pyexcel, loading a file to create a book in memory

This is solved; thanks to @vmontco's solution: I was missing MEDIA_URL, now it works perfectly. ----------original question below----------- I welcome suggestions from every angle; I am fairly new to Django and Python. I'm sure I am missing…
sboggs11
  • 178
  • 1
  • 12
1
vote
3 answers

dataframe to excel with styling (background and color)

I have a data frame as below and want to apply two conditions for the styling and save into excel. I could perform either of the condition at a time but not the both simultaneously. input: dataframe (2 colums) and a given_list(index…
shivam
  • 596
  • 2
  • 9
1
vote
0 answers

pyexcel - is there a way to get the column width?

I have an excel sheet that I can display via pyexcel.get_book like this: +------------------------+-------+---------------+--------------+-----------------------------------------------------------------+------------------------+----------+ …
ron_g
  • 1,474
  • 2
  • 21
  • 39
1
vote
0 answers

Python - How can I update an ODS file without losing the formatting

In my project, I'm using Python with the library pyexcel-ods3 and I need to change the value of some cells in my ods file. I manage to do it but every parameter I put in cells such as the color, the merging ect have been reset. Here's the code from…
Akli_chmk
  • 23
  • 3
1
vote
0 answers

How to put data to html but to look like excel sheet in django?

I have been studying how to put data from my excel document to the html, and I have found a way but it is bit tricky, maybe you can help me with this? (Link of documentation) This is where I have been studying, but in this case it is defined what is…
project.py
  • 107
  • 1
  • 4
  • 19
1
2 3 4 5 6 7