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

The argument type 'String' can't be assigned to the parameter type 'ExcelColor' #335

Open
Javicg10 opened this issue Mar 18, 2024 · 4 comments

Comments

@Javicg10
Copy link

Javicg10 commented Mar 18, 2024

Today I tried to compile and found multiple errors regarding backgroundColorHex:

The argument type 'String' can't be assigned to the parameter type 'ExcelColor'.

  CellStyle customCellStyle = CellStyle(
      backgroundColorHex: '#fce48e',
      bold: true,
      horizontalAlign: HorizontalAlign.Center);
@esingulten
Copy link

horizontalAlign doesn't work either

@esingulten
Copy link

ignores first line

@esingulten
Copy link

Today I tried to compile and found multiple errors regarding backgroundColorHex:

The argument type 'String' can't be assigned to the parameter type 'ExcelColor'.

  CellStyle customCellStyle = CellStyle(
      backgroundColorHex: '#fce48e',
      bold: true,
      horizontalAlign: HorizontalAlign.Center);

ExcelColore.red

@piddval
Copy link

piddval commented Mar 19, 2024

Hi,

Same happened to me. I fixed the errors by replacing the color literal strings with ExcelColor:

backgroundColorHex: '#FFE25C', --> ExcelColor.fromHexString('#FFE25C')

Regards

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

3 participants