标签: docx

如何使用 DocxJS 删除表格边框?

假设我想删除该表中的所有边框:

---------------------------
|   image    |    text    |
---------------------------
Run Code Online (Sandbox Code Playgroud)

按照在线文档: https: //docx.js.org/#/usage/tables

new Table({
   borders: {
              top: {style: BorderStyle.NONE},
              bottom: {style: BorderStyle.NONE},
              left: {style: BorderStyle.NONE},
              right: {style: BorderStyle.NONE},
            },
    rows: [
      new TableRow({
        children: [
          new TableCell({
            children: [
              new Paragraph({ children: [some_image_file] }),
            ],
          }),
          new TableCell({
            children: [
              new Paragraph({ text: "text" }),
            ],
          }),
        ],
      }),
     ],
  })
Run Code Online (Sandbox Code Playgroud)

这给出:

   image    |    text    
Run Code Online (Sandbox Code Playgroud)

根据文档,在 内移动边框选项TableCell应该会影响单元格的边框,但这样做时我看不到任何结果。有什么想法如何实现没有边框的表格吗?

javascript docx node.js

0
推荐指数
1
解决办法
1941
查看次数

我们可以使用c写入word文件吗?

int main()
{
    FILE *fs,*ft;
    char ch;
    fs=fopen("main.c","r");
    if(fs==NULL)
    {
        printf("can not open source file\n");
        getch();
        exit(1);
    }
    ft=fopen("demo.docx","w");
    if(ft==NULL)
    {
        printf("can not open target file\n");
        getch();
        exit(1);
    }
    while(1)
    {
        ch=fgetc(fs);
        if(ch==EOF)
        {
            break;
        }
        fputc(ch,ft);
    }
    fclose(fs);
    fclose(ft);
    return 0;
}
Run Code Online (Sandbox Code Playgroud)

使用上面的代码,我试图将内容复制main.cdemo.docx.
该程序工作正常,但当我外部打开时demo.docx,它崩溃了.
我身边有问题,或者我们无法docx使用c 写入文件?

c file docx

-1
推荐指数
1
解决办法
1220
查看次数

使用 PHP 查找 PDF、Docx、Doc、Ppt、Pptx 文件的页码

我希望我的 PHP 应用程序具有此功能:

当用户上传文档(PDF、DOCX、DOC、PPT、PPTC 扩展名)时,上传后用户将获得文档的总页数。

但没有使用exec()功能。

php pdf powerpoint doc docx

-1
推荐指数
1
解决办法
4472
查看次数

如何为 XWPFTableCell 添加边框

我的 XWPFTableCell 需要一个边框,如下表所示。

        **XXX Technologies**
Run Code Online (Sandbox Code Playgroud)

__________________
|姓名 |性别 |工资 |
__________________
拉吉女 24000
拉维男 06790

java docx apache-poi xwpf

-4
推荐指数
1
解决办法
5296
查看次数

标签 统计

docx ×4

apache-poi ×1

c ×1

doc ×1

file ×1

java ×1

javascript ×1

node.js ×1

pdf ×1

php ×1

powerpoint ×1

xwpf ×1