如题。
同时,如果能解释一下range是什么意思更好了。只是有用到一下写excel,不想多了解,希望大家提示一下

解决方案 »

  1.   

    http://xue163.com/html/20091129/2424789.html
      

  2.   

    Excel.Range   ran=(Excel.Range)mSheet.Cells[i,j];   
    if(ran.Value2==null)
    {}
    Excel.Range 类
    单个对象
    有时表示一个对象集合
      

  3.   

    我一般是用convert.isdbnull()判断,也能解决问题,没想到还有range一说,一下呵呵
      

  4.   

    如果是判断单个,用Range太浪费了
    if ThisWorkbook.Sheets(1).Cells(1,1).Value2 = "" then
    'do something
    End If
      

  5.   


    Cells()方法?没有呀?
      

  6.   

    呵呵,我用的是EXCEL中VBA的語法... ...
      

  7.   

    VBA:
    if ThisWorkbook.Sheets(1).Cells(1,1).Value2 = "" then 
    'do something 
    End If 
    Excel內置函數:
    =if(and(len(A1)>0,len(B1)>0),A1-B1,0)
    (若A1、B1單元格內容都不為空,則值為A1-B1,否則為0)