Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
每当我将此字符串定义为数字时,它都会给我错误“将 const char 传递给不兼容的 double 类型”。当我将字符串定义为 xlSheetWriteStr 时没有问题,但是当我将其定义为数字时,它给了我错误。
这是有问题的代码 -
xlSheetWriteNum(sheet, 2, 1,[self.personcityTextField.text UTF8String], 0);
提前致谢。
第四个参数xlSheetWriteNum需要一个双精度值而不是字符串值。试试这个:
xlSheetWriteNum
xlSheetWriteNum(sheet, 2, 1, [self.personcityTextField.text doubleValue], 0);