GithubHelp home page GithubHelp logo

Comments (6)

yang-xiaodong avatar yang-xiaodong commented on May 30, 2024

此功能是否在原NPOI 中正常?

from npoi.

WeihanLi avatar WeihanLi commented on May 30, 2024

是的,原 NPOI 是可以的,

NPOI V2.3.0
DotNetCore.NPOI V1.0.1

from npoi.

yang-xiaodong avatar yang-xiaodong commented on May 30, 2024

我这边测试可以生效呢? 只是有一点不准,能不能贴代码?

from npoi.

WeihanLi avatar WeihanLi commented on May 30, 2024
IWorkbook workbook = new HSSFWorkbook();
ISheet sheet = workbook.CreateSheet("账单记录");

int i = 0;
var headRow = sheet.CreateRow(0);
headRow.CreateCell(0, CellType.String).SetCellValue("账单标题");
headRow.CreateCell(1, CellType.String).SetCellValue("账单类型");
headRow.CreateCell(2, CellType.String).SetCellValue("账单金额");
headRow.CreateCell(3, CellType.String).SetCellValue("账单详情");
headRow.CreateCell(4, CellType.String).SetCellValue("创建人");
headRow.CreateCell(5, CellType.String).SetCellValue("创建时间");

//...

 // 自动调整单元格的宽度
sheet.AutoSizeColumn(0);
sheet.AutoSizeColumn(1);
sheet.AutoSizeColumn(2);
sheet.AutoSizeColumn(3);
sheet.AutoSizeColumn(4);
sheet.AutoSizeColumn(5);

More

from npoi.

yang-xiaodong avatar yang-xiaodong commented on May 30, 2024

http://blog.csdn.net/wandongcheng/article/details/41696979

https://www.baidu.com/s?wd=autosizecolumn%E5%A4%B1%E6%95%88&rsv_spt=1&rsv_iqid=0xf22164f100013cc6&issp=1&f=3&rsv_bp=1&rsv_idx=2&ie=utf-8&rqlang=cn&tn=baiduhome_pg&rsv_enter=1&rsv_t=a620dNUfD6JXrunOnfO7bpQG4hpkRY8zjKq%2Fuw%2B5cL8TzuUKiM4Rjbh7LL1EAKdYNIpN&oq=autosizecolumn&rsv_pq=8a920e9300013f17&rsv_sug3=5&rsv_sug1=3&rsv_sug7=100&rsv_sug2=1&prefixsug=autosizecolumn&rsp=0&rsv_sug4=944

from npoi.

WeihanLi avatar WeihanLi commented on May 30, 2024

嗯,感谢,是否可以兼容一下中文呢

from npoi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.