【问题标题】:empty row and column while Exporting Several XtraGrid Controls to a Single Excel File将多个 XtraGrid 控件导出到单个 Excel 文件时为空行和列
【发布时间】:2014-04-16 16:58:30
【问题描述】:

我已阅读 this article 并进行了测试,它可以工作,但我的问题是每张工作表(在 Excel 文件中)都有一个宽空列(A 列)和一个宽空行(第 1 行)。我知道这是 PrintingBase 类的设置。但是我怎样才能删除那些第一个空列和行?

【问题讨论】:

    标签: devexpress


    【解决方案1】:

    我找到了我自己问题的答案:

    var compositeLink = new CompositeLinkBase();
    var link1 = new PrintableComponentLinkBase();
    // this is the margins in sheet1
    link1.Margins.Left = 0;
    link1.MinMargins.Left = 0;
    link1.Component = DG1;
    compositeLink.Links.Add(link1);
    // then export to excel :)
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-12-06
      相关资源
      最近更新 更多