Skip to content

Commit

Permalink
chore: update readme example
Browse files Browse the repository at this point in the history
  • Loading branch information
ChronicStone committed Dec 6, 2023
1 parent 1e43553 commit 9395126
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 54 deletions.
19 changes: 0 additions & 19 deletions .github/workflows/snorkell-auto-documentation.yml

This file was deleted.

19 changes: 15 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,26 @@ const buffer = ExcelBuilder
},
})
.sheet('User - Multiple tables')
.sheet('Multi-tables-grid', { tablesPerRow: 3 })
.addTable({
data: users.filter((_, i) => i < 10),
data: users.filter((_, i) => i < 5),
schema: assessmentExport,
select: { balance: true, email: true, createdAt: true },
select: { firstName: true, lastName: true, email: true, createdAt: true },
})
.addTable({
data: users.filter((_, i) => i < 10),
data: users.filter((_, i) => i < 5),
schema: assessmentExport,
select: { firstName: true, lastName: true, email: true },
select: { firstName: true, lastName: true, email: true, balance: true },
})
.addTable({
data: users.filter((_, i) => i < 5),
schema: assessmentExport,
select: { firstName: true, lastName: true, email: true, balance: true },
})
.addTable({
data: users.filter((_, i) => i < 5),
schema: assessmentExport,
select: { firstName: true, lastName: true, email: true, createdAt: true },
})
.build({ output: 'buffer' })

Expand Down
32 changes: 1 addition & 31 deletions test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ describe('should generate the example excel', () => {
'group:org': organizations,
},
})
.sheet('User - Multiple tables', { tablesPerRow: 3 })
.sheet('Multi-tables-grid', { tablesPerRow: 3 })
.addTable({
data: users.filter((_, i) => i < 5),
schema: assessmentExport,
Expand All @@ -155,36 +155,6 @@ describe('should generate the example excel', () => {
schema: assessmentExport,
select: { firstName: true, lastName: true, email: true, createdAt: true },
})
.addTable({
data: users.filter((_, i) => i < 5),
schema: assessmentExport,
select: { firstName: true, lastName: true, email: true, balance: true },
})
.addTable({
data: users.filter((_, i) => i < 5),
schema: assessmentExport,
select: { firstName: true, lastName: true, email: true, createdAt: true },
})
.addTable({
data: users.filter((_, i) => i < 5),
schema: assessmentExport,
select: { firstName: true, lastName: true, email: true, balance: true },
})
.addTable({
data: users.filter((_, i) => i < 5),
schema: assessmentExport,
select: { firstName: true, lastName: true, email: true, createdAt: true },
})
.addTable({
data: users.filter((_, i) => i < 5),
schema: assessmentExport,
select: { firstName: true, lastName: true, email: true, balance: true },
})
.addTable({
data: users.filter((_, i) => i < 5),
schema: assessmentExport,
select: { firstName: true, lastName: true, email: true, createdAt: true },
})
.build({ output: 'buffer' })

fs.writeFileSync('example.xlsx', buffer)
Expand Down

0 comments on commit 9395126

Please sign in to comment.