|
|
|
@@ -14,7 +14,7 @@ namespace BlackRockReportFunction.Bussines |
|
|
|
{ |
|
|
|
public static async Task<ExcelFile> GenerateReportContent() |
|
|
|
{ |
|
|
|
string licenseKey = "E0YU-JKLB-WFCE-N52P"; |
|
|
|
string licenseKey = Environment.GetEnvironmentVariable("GemBoxLicenseKey"); |
|
|
|
SpreadsheetInfo.SetLicense(licenseKey); |
|
|
|
|
|
|
|
var testObject = new ClockifyReport |
|
|
|
@@ -205,12 +205,12 @@ namespace BlackRockReportFunction.Bussines |
|
|
|
|
|
|
|
foreach (var sheet in localFile.Worksheets) |
|
|
|
{ |
|
|
|
//var columnCount = sheet.CalculateMaxUsedColumns() - 1; |
|
|
|
var columnCount = sheet.CalculateMaxUsedColumns(); |
|
|
|
|
|
|
|
//for (int i = 0; i < columnCount; i++) |
|
|
|
//{ |
|
|
|
// sheet.Columns[i].AutoFit(1, sheet.Rows[0], sheet.Rows[sheet.Rows.Count - 1]); |
|
|
|
//} |
|
|
|
for (int i = 0; i < columnCount; i++) |
|
|
|
{ |
|
|
|
sheet.Columns[i].AutoFit(1, sheet.Rows[0], sheet.Rows[sheet.Rows.Count - 1]); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return localFile; |