sheetex - v1.3.0
    Preparing search index...

    Class WorkSheet

    工作表管理

    1.0.0

    Index

    Constructors

    Constructors

    • 构造函数

      Parameters

      Returns WorkSheet

      1. 生成一个只有数据,不带任何样式的工作表
      const block = {
      origin: 'A1',
      data: [['hello', 'world']]
      }
      const ws = new WorkSheet('Sheet1', [block]);
      1. 生成一个带样式的工作表(hello 被加粗)
      const block = {
      origin: 'A1',
      data: [[{value: 'hello', style: 'bold'}, 'world']]
      }
      cost styles = {
      bold: {
      font: {
      b: true
      }
      }
      }
      const ws = new WorkSheet('Sheet2', [block], styles);
      1. 生成一个配置了列宽的工作表
      const block = {
      origin: 'A1',
      data: [['hello', 'world']]
      };
      const options = {
      colWidths: {min: 1, max: 2, size: 40}
      };
      const ws = new WorkSheet('Sheet3', [block], {}, options);

      1.0.0