qrilka / xlsx

Simple and incomplete Excel file parser/writer
MIT License
132 stars 64 forks source link

How to insert a row #131

Closed yq0810 closed 3 years ago

yq0810 commented 4 years ago

I didn't see a similar function

qrilka commented 4 years ago

Hi @yq0810 Sorry for a late reply - was away on vacation. Could you explain what "insert a row" mean for Excel? I'm asking because a row without any cells with values makes not much sense. As for inserting cell values see e.g. https://hackage.haskell.org/package/xlsx-0.8.1/docs/Codec-Xlsx.html Let me know if this doesn't answer your question.

yq0810 commented 4 years ago

Like this and follow the style image

qrilka commented 4 years ago

It's not clear what exactly do you need - just insert numbers cells A1 to A9 and then A11 to A17. If what you want is to move cells A10:A16 to A11:A17 and add an empty cell A10 then you need to do all of that by yourself - there's no magic instruction to do this in one go. It's like when you have C array (or Haskell vector) - you can't insert a value into middle of it moving all elements higher, you need to write some code to do that.

qrilka commented 4 years ago

@yq0810 were you able to resolve this already or still need some help? With no response I'll close this late today.