Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple capital letters in title are lowercased and empty space is added in between #4

Closed
hixus opened this issue Apr 28, 2024 · 2 comments

Comments

@hixus
Copy link

hixus commented Apr 28, 2024

Seems multiple capital letters in title are lowercased and empty space is added in between. Tested the sample and noticed the ID has space between. Would assume title remains as written by default.

CleanShot 2024-04-28 at 20 03 07@2x

interface User {
    id: number;
    name: string;
    email: string;
  }

  const schema = ExcelSchemaBuilder.create<User>()
    .column("ID", { key: "id" })
    .column("NAME", { key: "name" })
    .column("Email", { key: "email" })
    .build();

  const users: User[] = [
    {
      id: 1,
      name: "JOHN Doe",
      email: "john@foo.com",
    },
  ];

  const excelFile = ExcelBuilder.create()
    .sheet("Sheet1")
    .addTable({
      data: users,
      schema,
    })
    .build({ output: "buffer", bordered: false });
``
@ChronicStone
Copy link
Owner

@hixus Thanks for the report, fixed & released with v0.2.12.
When label isn't provided, the lib use the column key as label but previously ran some formatting on the raw key.

It was on the early iterations of the lib, does not seem useful & relevant anymore, I just removed it.

@hixus
Copy link
Author

hixus commented Apr 29, 2024

Thanks, works now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants