|
@@ -131,7 +131,18 @@ namespace UAS_MES_NEW.Query
|
|
|
string path = Application.StartupPath + @"\" + ps_prodcode.Text + @"\";
|
|
string path = Application.StartupPath + @"\" + ps_prodcode.Text + @"\";
|
|
|
Worksheet she = workbook.Worksheets[i];
|
|
Worksheet she = workbook.Worksheets[i];
|
|
|
// ---------- 基础参数 ----------
|
|
// ---------- 基础参数 ----------
|
|
|
- int lastColIndex = she.Cells.MaxDataColumn + 3;
|
|
|
|
|
|
|
+ int contentMaxCol = she.Cells.MaxDataColumn;
|
|
|
|
|
+ for (int p = 0; p < she.Pictures.Count; p++)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (she.Pictures[p].LowerRightColumn > contentMaxCol)
|
|
|
|
|
+ contentMaxCol = she.Pictures[p].LowerRightColumn;
|
|
|
|
|
+ }
|
|
|
|
|
+ for (int s = 0; s < she.Shapes.Count; s++)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (she.Shapes[s].LowerRightColumn > contentMaxCol)
|
|
|
|
|
+ contentMaxCol = she.Shapes[s].LowerRightColumn;
|
|
|
|
|
+ }
|
|
|
|
|
+ int lastColIndex = contentMaxCol; // 额外留3列边距
|
|
|
string lastColLetter = CellsHelper.ColumnIndexToName(lastColIndex);
|
|
string lastColLetter = CellsHelper.ColumnIndexToName(lastColIndex);
|
|
|
const int headerRows = 3;
|
|
const int headerRows = 3;
|
|
|
int dataRowsPerPage = int.Parse(RowCount.Value.ToString());
|
|
int dataRowsPerPage = int.Parse(RowCount.Value.ToString());
|