使用互操作 [c#] 打印 Excel 个单元格的范围
Printing Range of Excel cells using interop [c#]
我正在尝试打印 excel 文件的范围,但是当我写这行时 Range("A:1","D10")
带有下划线的语句是 "Non-invocable member of _Worksheet.Range[object, oject] cannot be used like a method".
我该如何改变它并让它发挥作用?
(我正在使用 COM Microsoft.Office.Interop.Excel)
xlWorkSheet.Range("A1:D10").PrintOutEx(misValue, misValue, misValue, misValue,
misValue, misValue, misValue, misValue);
You use the wrong brackets ( is for VB
xlWorkSheet.Range["A1:D10"].PrintOutEx(misValue, misValue, misValue, misValue,
misValue, misValue, misValue, misValue);
我正在尝试打印 excel 文件的范围,但是当我写这行时 Range("A:1","D10")
带有下划线的语句是 "Non-invocable member of _Worksheet.Range[object, oject] cannot be used like a method".
我该如何改变它并让它发挥作用?
(我正在使用 COM Microsoft.Office.Interop.Excel)
xlWorkSheet.Range("A1:D10").PrintOutEx(misValue, misValue, misValue, misValue,
misValue, misValue, misValue, misValue);
You use the wrong brackets ( is for VB
xlWorkSheet.Range["A1:D10"].PrintOutEx(misValue, misValue, misValue, misValue,
misValue, misValue, misValue, misValue);