Giter Site home page Giter Site logo

hot to set font size? about npoi HOT 3 CLOSED

dotnetcore avatar dotnetcore commented on May 20, 2024
hot to set font size?

from npoi.

Comments (3)

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

I did a test, it also doesn't work in NPOI , I don't know if I can resolve it

from npoi.

591811930 avatar 591811930 commented on May 20, 2024
        IRow row1 = sheet1.CreateRow(0);
        row1.Height = 30 * 20;
        var cell1 = row1.CreateCell(0);

        var font1 = workbook.CreateFont();
        font1.Boldweight = 18;
        font1.FontHeightInPoints = 18;
        var style1 = workbook.CreateCellStyle();
        style1.VerticalAlignment = VerticalAlignment.Center;
        style1.Alignment = HorizontalAlignment.Center;
        style1.SetFont(font1);

        cell1.SetCellValue("test");
        cell1.CellStyle = style1;

this code works

from npoi.

591811930 avatar 591811930 commented on May 20, 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.