Comments (13)
+1 !
I especially use the setColWidths
function in openxlsx
to auto-adjust colum width.
from writexl.
From a libxlsxwriter point of view the feasibility/difficulty of the formatting features requested above is:
openxlsx.dateFormat
. Relatively easy. This can be done with the existing writexl code.- Manual column widths
col_widths <- c(11, 10, 36)
: Relatively easy in libxlsxwriter. However, autofit columns aren't currently supported since it isn't part of the file format and would have to be simulated. - Freeze panes
freezePane(wb, 1, firstRow = TRUE)
: This is pretty straightforward in libxlsxwriter. - Write and add autofilter
writeData(wb, 1, df, withFilter = TRUE)
. This is also relatively straightforward. asTable
: Tables aren't supported in libxlsxwriter yet (but are supported in xlsxwriter like this Pandas example ). It should be available in the next few months. Update: it is available now.- Header formatting. Relatively easy. This can be done mainly with the existing writexl code.
If there is interest I could try implement examples of most of these, apart from number 5 (for now).
from writexl.
Love the package, but auto column widths would be great.
from writexl.
some basic formatting for table header would be nice, just like as params asTable of openxlsx.write.xlsx
from writexl.
@jeroen, any plans in adding some formatting options? I agree with @stephLH on his remark about setColWidths
function that auto-adjusts column width. Writexl
really is a great package that does it's job very easily. My colleagues like it when I use it to make data available in excel. However, their first impression would be much more positive if the column width would be automatically set right. The adjustment of the column width is the first thing really every user, including myself, does manually after opening the generated Excel file. Always. It's the first thing that is needed for eveyone to make the data readable. So I was just wondering :-)
from writexl.
Personally, I would like to have autofilter options added 👍 :)
from writexl.
Agree with all of the above! Great package so far; these things would make it even better.
P.S. Death to clippy.
from writexl.
+1 for freezePane
:-)
from writexl.
+1 for freeze panes too! Would also be nice to format the columns differently :)
from writexl.
Currently Format header format_headers = TRUE allows to have col_names in the xlsx centered and bold. Can we have option to keep them aligned on left but bold or as needed. It does not make sense for to rows align to left but header to center, what we still want to keep is bold headers. Some users complains because center aligned headers are not properly readable without adjusting width. Hope this make sense.
from writexl.
I'm worried that formatting is a rabbit hole that will introduce a lot of complexity that I don't have time to review or maintain. The primary goal of writexl is to be simple, fast and reliable to make R data accessible to excel users. Formatting is beyond the scope of what I had in mind.
If there is some low hanging fruit that is trivial to implement, and widely useful, we could add it, but I am very worried of feature creep when we start adding all the one-off formatting feature requests.
from writexl.
Could a pre-formatted template be the solution? Unfortunately, I don't know how intertwined the formatting is with the data in the zip file. But maybe there is somehow a possibility to use the XML Source
or maybe an option with SourceData
. See
Overview of XML in Excel
from writexl.
I understand that introducing this complexity might be something the maintainer does not want to incorporate. So anybody really needing this can use my fork to introduce some of this behavior:
if (!require(devtools)) {
install.packages("devtools")
}
# Install the writexl package from the forked GitHub repository
devtools::install_github("rix133/writexl")
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.