Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Losing headers when writing Excel #1

Open
Kaotic3 opened this issue Jun 16, 2022 · 0 comments
Open

Losing headers when writing Excel #1

Kaotic3 opened this issue Jun 16, 2022 · 0 comments

Comments

@Kaotic3
Copy link

Kaotic3 commented Jun 16, 2022

Hi,

Nice demo, works well, just wanted to highlight that in the WeatherForecastXLS code:

ws.Cell(row + 1, 1).Value = "'" + data[row].Date.ToShortDateString();

Since the row starts at 0, +1 = Row 1, which is where you put your headers. So you wouldn't get any headers.

Would need to be:

ws.Cell(row + 2, 1).Value = "'" + data[row].Date.ToShortDateString();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant