Skip to content

Commit

Permalink
Fix multiline string value cell width
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnoSaine authored Jun 3, 2023
1 parent 1dac19b commit a77e1c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/main-library/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const getWorksheetColumnIds = (worksheet: WorkSheet): string[] => {

const getObjectLength = (object: unknown): number => {
if (typeof object === "string") {
return object.length
return Math.max(...object.split("\n").map((string) => string.length))
}
if (typeof object === "number") {
return object.toString().length
Expand Down Expand Up @@ -213,4 +213,4 @@ module.exports = xlsx
module.exports.getContentProperty = getContentProperty
module.exports.getJsonSheetRow = getJsonSheetRow
module.exports.getWorksheetColumnWidths = getWorksheetColumnWidths
module.exports.utils = utils
module.exports.utils = utils

0 comments on commit a77e1c3

Please sign in to comment.