1
寫字符串值我使用win32com寫,我從數據庫中獲得一定的日期,我的問題是,我有類似「01」的價值觀和Excel中只是「1」 - 不是'01'。 例子:win32com - 在Excel工作表
b = row[1] # b has the value 01
c = "-"+b+"-" # c has value -01-
sheet.Cells(1,1).Value = b # I have in Excel '1' ; I've try with str(b), c - but is the same
我怎麼能解決這個問題,有在Excel中值識別爲一個字符串,在這種情況下 - 01?
謝謝。
是否'sheet.Cells(1,1)'有一個屬性像'format'在那裏你可以把它改成字符串/文本? – eumiro 2010-10-14 09:32:19