Comments (9)
Please provide a reproducible example of the file that you generated.
from writexl.
airlines <- readr::read_csv(file="https://www.dropbox.com/s/xkznuhtokjmjomh/airline_delay_2016_09.csv?dl=1")
writexl::write_xlsx(airlines, path='~//Downloads/text.xlsx', col_names=TRUE);
This generates 39.3MB xlsx file. But if you open it with Excel or Number and re-saved it as Excel without changing anything, the file reduced to 4.7MB
from writexl.
I cannot reproduce this problem. If I opentest.xlsx
in excel and then resave it, the size actually increases to 41.4MB. I'm using excel 2016 for mac (v15.41).
from writexl.
I also cannot reproduce this problem. Resaving it in various formats with Excel 2013 for PC (v14.0760):
- xlsx = 41 MB
- xlsb = 18 MB
- csv = 40 MB
- csv zipped = 7.9 MB
- xls = 16 MB (which truncates the data to 65536 rows)
from writexl.
ok, could you please try this?
- On Mac, with Numbers open the xlsx file generated with writexl::write_xlsx
- Without changing anything, export as Excel.
Then you'll get xlsx file with 4.7MB. Here is the xlsx file.
https://www.dropbox.com/s/pgqf0fzn682g2od/test-reduced.xlsx?dl=0
from writexl.
@hidekoji This is what happens for me.
- Download the file from dropbox, which is 4.6 MB.
- Import it into R with readxl.
- Write it to a new xlsx file with writexl::write_xlsx, which creates a 5.1 MB file.
- Open that 5.1 MB file in Excel 2013 for PC and resave it, which creates a 6.0 MB file.
Are you using the lateset version of writexl
?
from writexl.
Finally, no answer to this question? I have the same issue. I download a .xlsx file, size 500KB, after opening and saving it without any changes the size increase at 1400KB.
What can I do?
Thanks for any kind of help
from writexl.
Can you provide an example file and the exact code that you run, so that we can test the problem?
from writexl.
I think this issue should be closed.
The underlying libxlsxwriter library specifically aims to produce xlsx file that are the same as the files produced by Excel. There may be differences in overall size caused by the zip library and compression level but these shouldn't be anything other than +/- 10%. Also, the same mechanism is used in the libxlsxwriter sister libraries of XlsxWriter in Python and Excel::Writer::XLSX in Perl and this issue is never reported there.
Finally, I tried to reproduce with the the file provided by @hidekoji above and cannot:
4.5M test-reduced.xlsx # Original
6.3M test-reduced2.xlsx # Resaved in Excel 2011
4.5M test-reduced3.xlsx # Opened in Numbers and reserved as an xlsx file
Other people in the thread have also pointed out that they cannot reproduce this so I think it should be closed.
from writexl.
Related Issues (20)
- Consider improving error message when a named sheet name exceeds the max character length supported by Excel HOT 3
- write_xlsx fails silently if no path argument supplied HOT 1
- Error in libxlsxwriter: 'String exceeds Excel's limit of 32,767 characters.' HOT 5
- NAs HOT 2
- Never ever remove Clippy! HOT 4
- Error in libxlsxwriter : 'Worksheet row or column index out of range.' HOT 2
- Time only POSIXct columns end up a day out HOT 3
- I Loved Clippy !
- writexl::write_xlsx incompatibility with openxlsx HOT 3
- write_xlsx gives 2 errors when writing dates with NA - version 1.4.1 HOT 4
- writexl1.4.1 bug: Empty field -> "nan(snan) HOT 5
- write_xlsx directory
- Write / overwrite a sheet in an existing excel workbook (without overwriting entire workbook)? HOT 2
- Bug: Clippy does not appear! HOT 1
- Dont try to write more than max rows
- Mention openxlsx2 as an alternative to write content
- Feature Request: Make Clippy togglable
- Failure when the storage type of `POSIXct` is `integer`
- Support NetBSD, thanks HOT 3
- write xlsx without any fonts HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from writexl.