Avatar of Crystal Rouse
Crystal Rouse
Flag for United States of America

asked on 

Help updating a ForLoop

I need help with this For Loop.  I should be writing more than one line.  I am building an Excel file.  The Hats.Count is more than one but I am only writing one line in the for loop.

for (row = 5; row - 5 < Hats.Count; row++)
                ws.Cells[row, 1].Value = Hats[row - 5].data.Name

                foreach (var c in Hats[row - 5].columns)
                    ws.Cells[row, c].Value = "X";
                    ws.Cells[row, c].Style.HorizontalAlignment = HorizontalAlignmentStyle.Center;
                    ws.Cells[row, c].Style.Font.Weight = ExcelFont.BoldWeight;

Open in new window


Avatar of undefined
Last Comment
Crystal Rouse

8/22/2022 - Mon