We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
using Magicodes.ExporterAndImporter.Core; using Magicodes.ExporterAndImporter.Excel; namespace ConsoleApp1 { internal class Program { static async Task Main(string[] args) { var _data = new List<Demo>() { new Demo(){ Id=1,Name="asddfasdfasdfasdfasdfasdfasdff"}, new Demo(){ Id=2,Name="asdfasdfasdfasdfasdfasdfasdfasdfasfasdfasdfasdfasdfasdfas"}, }; var _export = new ExcelExporter(); var _path = AppDomain.CurrentDomain.BaseDirectory + "/data1.xlsx"; var result = await _export.Export(_path, _data); Console.WriteLine("Hello, World!"); } } [ExcelExporter(Name = "测试2", TableStyle = OfficeOpenXml.Table.TableStyles.None, AutoFitAllColumn = true, MaxRowNumberOnASheet = 100)] public class Demo { [ExporterHeader(DisplayName = "Id", IsBold = true, Width = 3000)] public int Id { get; set; } [ExporterHeader(DisplayName = "加粗文本", WrapText=true, IsBold = true, Width = 2000)] public string Name { get; set; } } }
The text was updated successfully, but these errors were encountered:
@hangyejiadao 得把自适应去掉把。 AutoFitAllColumn = true 改为false
Sorry, something went wrong.
No branches or pull requests
The text was updated successfully, but these errors were encountered: