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

Space in TableCell, when used Table in TableCell. Its problem only in google document #1947

Open
jerryk1925 opened this issue Feb 16, 2023 · 6 comments

Comments

@jerryk1925
Copy link

jerryk1925 commented Feb 16, 2023

Thank you for raising an issue to docx

Hi, i have problem, when i used new Table inside new TableCell, arounde Table create free space, for example used this code
Its problem only in google docs.

new TableCell({
  columnSpan: 2,
  width: {
    size: 5453.85,
    type: WidthType.DXA,
  },
  children: [
    new Table({
      rows: [
        new TableRow({
          children: [
            new TableCell({ children: [new Paragraph({ children: [textBase({ text: '123' })] })] }),
          ],
        }),
      ],
    }),

image

@damian-garrido
Copy link

hi @jerryk1925
try to add a width to your table like

new Table ({ ... width: { size: '100%', type: WidthType.PERCENTAGE }, ... })

hope this could help you!

@CarrionB
Copy link

You can view it correctly only on Microsoft Word it seems

@filoscoder
Copy link

@jerryk1925 did you solve this issue?

I'm facing the same issue, I'm working on a Mac, this issue happens on Pages as in Google Docs. I don't have access to MS Word to check it there :(

@jerryk1925
Copy link
Author

no i cant fix this problem(

@CarrionB
Copy link

CarrionB commented May 1, 2023

@jerryk1925 did you solve this issue?

I'm facing the same issue, I'm working on a Mac, this issue happens on Pages as in Google Docs. I don't have access to MS Word to check it there :(

I think you can access to Microsoft Word online with an outlook account, you may check it.

@aldenho52
Copy link

aldenho52 commented Jan 10, 2024

Hey @jerryk1925 @CarrionB @filoscoder #216 has the correct fix for this. You need to set the table with columnWidths and make sure the TableCell width matches that.

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

5 participants