0

Whenever i define this string as a number, it gives me the error 'Passing const char to incompatible type double'. When i define the string as xlSheetWriteStr there are no issues but when i define it as a number it gives me the error.

Here is the code with the issue -

 xlSheetWriteNum(sheet, 2, 1,[self.personcityTextField.text UTF8String], 0);

Thanks in advance.

1 Answers1

0

The fourth parameter to xlSheetWriteNum expects a double and not a string value. Try this:

xlSheetWriteNum(sheet, 2, 1, [self.personcityTextField.text doubleValue], 0);
amarcus
  • 226
  • 2
  • 6