네비게이션 상단바 이동, 가로 스크롤 고정.

This commit is contained in:
Lectom C Han
2026-01-09 19:29:06 +09:00
parent 7b93467c6e
commit dde7290ab7
9 changed files with 303 additions and 283 deletions

View File

@@ -144,7 +144,9 @@ public class ExcelLoader
if (string.IsNullOrWhiteSpace(val)) val = lastLeftValues[c];
else lastLeftValues[c] = val;
if(!string.IsNullOrWhiteSpace(val)) {
currentLeftParts.Add(val);
var headerLabel = (c < leftAxisHeaders.Count) ? leftAxisHeaders[c] : $"Col{c}";
var combined = CombineHeaderAndValue(headerLabel, val);
if (!string.IsNullOrWhiteSpace(combined)) currentLeftParts.Add(combined);
rowHasContent = true;
}
}
@@ -256,15 +258,35 @@ public class ExcelLoader
string val = (c < headerRows[r].Length) ? headerRows[r][c] : "";
if (!string.IsNullOrWhiteSpace(val)) parts.Add(val);
}
// If empty, use "Col_Index" fallback or keep empty?
// User schema usually requires keys. If empty, it's skipped in mapping.
// Let's keep it empty, but if data exists, it won't map unless we have a key.
// If parts is empty, let's leave valid empty string so mapping can decide.
flatHeaders.Add(string.Join("__", parts));
var combined = CombineHeaderParts(parts);
if (string.IsNullOrWhiteSpace(combined))
{
int logicalIndex = c - startCol;
combined = $"Col_{logicalIndex}";
}
flatHeaders.Add(combined);
}
return flatHeaders;
}
private static string CombineHeaderParts(IEnumerable<string> parts)
{
var clean = parts
.Where(p => !string.IsNullOrWhiteSpace(p))
.Select(p => p.Trim());
var joined = string.Join(".", clean);
return joined;
}
private static string CombineHeaderAndValue(string header, string value)
{
header = header?.Trim() ?? "";
value = value?.Trim() ?? "";
if (string.IsNullOrWhiteSpace(value)) return "";
if (string.IsNullOrWhiteSpace(header)) return value;
return $"{header}.{value}";
}
private record MergeRange(int StartRow, int EndRow, int StartCol, int EndCol);
private static List<MergeRange> GetMergedRanges(string filePath, string sheetName)