sheetjs icon indicating copy to clipboard operation
sheetjs copied to clipboard

Read + write style information to .xlsx

Open protobi opened this issue 10 years ago β€’ 29 comments

A collective series of changes that allows style information to be read from and written to xlsx files. This should not affect .xls or .xlsb files.

Submitting a pull request so that the option to merge the changes exists. Am open to additional steps to harmonize this with the rest of the lib if required.

protobi avatar Jun 24 '15 15:06 protobi

@protobi check your email.

We're gonna squash, so don't worry about the commit log for the moment. Taking a quick scan at the changed files (https://github.com/SheetJS/js-xlsx/pull/263/files?diff=unified click on "changed files"):

  • I just noticed you added some files .DS_Store and .idea/scopes/scope_settings which should be removed (probably should add .DS_Store and .idea/ to the .gitignore
  • Should the lab directory also be ignored?
  • Can you move the new test files (test-*.js as well as supporting files like out.txt) to the tests subdirectory? We can blow away the old jasmine tests
  • I'm not sure whether the example files should be put in the misc folder or in a separate samples directory. Thoughts?

SheetJSDev avatar Jun 26 '15 15:06 SheetJSDev

Files now removed from the repo, these had earlier been inadvertently added.

protobi avatar Jun 26 '15 17:06 protobi

This is awesome!

rclai avatar Jun 29 '15 16:06 rclai

@protobi are you able to mention in the docs that you need to put cell styles inside the s property before being encoded? I was having hard time figuring out why my styles weren't showing up.

rclai avatar Jun 29 '15 16:06 rclai

@rclai Thanks for beta testing the docs and providing that feedback. Will edit this docs later this week.

protobi avatar Jun 29 '15 23:06 protobi

:+1: this was a great help to find thanks @protobi . Modifying without changing styling was a must have for my project.

any chance this will be merged?

chrismatheson avatar Jul 20 '15 14:07 chrismatheson

how exciting, renewed activity means this has finally has a chance of being pulled in i hope

willgriffin avatar Mar 13 '17 20:03 willgriffin

We're slowly picking changes. The first commit, credited to @protobi, fills out some holes in the xml style parsing. It won't show up in the github UI as a merge but it will credit you as a contributor.

SheetJSDev avatar Mar 19 '17 07:03 SheetJSDev

Instead of hardcoding the specific property overrides, the writer now takes a Props key in the options object and uses those instead of the workbook properties. It's explained in the README, but it boils down to the following changes:

this fork main repo
"title" "Title"
"subject" "Subject"
"description" "Comments"
"keywords" "Keywords"
"creator" "Author"

The mapping from the XLSX name to the CSF name is in the CORE_PROPS variable in bits/33_coreprops.js.

SheetJSDev avatar Apr 10 '17 18:04 SheetJSDev

the theme override is now passed with the themeXLSX option. themeXml is ambiguous since multiple formats use xml-based themes, so calling it themeXLSX makes it clear we are talking about pass-through XLSX-style themes.

SheetJSDev avatar Apr 17 '17 02:04 SheetJSDev

Can anyone send me the codes to convert excel(xlsx) file to json file in java script with explanation to [email protected]

vedant05 avatar Jun 14 '17 12:06 vedant05

@SheetJSDev ,when this PR will get merged ? I am waiting for its new release with the support of style.

Yugam18 avatar Jun 20 '17 12:06 Yugam18

When to merge into master?I need it super. Support!

125037225 avatar Jan 29 '18 07:01 125037225

Need this too! Hopefully it will be merged soon πŸ™

zenbaku avatar Feb 14 '18 16:02 zenbaku

@SheetJSDev, can you please advise as to when this will get merged? I need to style & format the cells.

estrellajm avatar Mar 18 '18 20:03 estrellajm

Hi @SheetJSDev, when this PR will be merged with master branch ? Thanks you

benjaminaudet avatar May 03 '18 08:05 benjaminaudet

BUMP! This is quite an important feature for us, is it possible to merge it soon @protobi @SheetJSDev ? Do you need any help in order to speed up the process? This PR has been open for far too long.

minecrawler avatar Jan 23 '19 18:01 minecrawler

Important for us too

kirillgroshkov avatar May 15 '19 15:05 kirillgroshkov

Any luck on merging everything?

ralph-dev avatar Feb 26 '20 20:02 ralph-dev

I don't have any idea why I am in reviewer list, @SheetJSDev can you please check this.

nakshay avatar Feb 27 '20 06:02 nakshay

@nakshay here is the answer πŸ™‚

Screenshot 2020-02-27 at 08 07 00

kachkaev avatar Feb 27 '20 08:02 kachkaev

@nakshay here is the answer πŸ™‚

Screenshot 2020-02-27 at 08 07 00

Yeh embarrassing , happened by mistake, and not able to find way to undo it .

nakshay avatar Feb 27 '20 10:02 nakshay

Any updates on this PR?

semaurer avatar Mar 06 '20 21:03 semaurer

Annual bump... 5 years later, still would be useful.

cjtafoya avatar Nov 18 '20 04:11 cjtafoya

@cjtafoya πŸ˜†

Annual bump... 6 years later, still would be useful.

sadortun avatar Jan 11 '21 03:01 sadortun

This is vital to me to be able to use the library.

JulianNicholls avatar Jan 20 '22 15:01 JulianNicholls

any progress?

jwang0512 avatar Jan 10 '24 12:01 jwang0512

Annual bump... 7 years later, still would be useful.

kirillgroshkov avatar Jan 10 '24 13:01 kirillgroshkov

You know, if you bump the issue for 10 years every year - you're absolutely guaranteed to get it fixed/merged

kirillgroshkov avatar Jan 10 '24 13:01 kirillgroshkov