0

I am converting VBA and excel/OLE code into c# with spreadsheetgear. I got stuck in Range.SpecialCells method. I am unable to found out replace for it in c# and spreadsheetgear.

In VBA Range.SpecialCells is used as:

SpecialCells(xlCellTypeLastCell, ((long)xlTextValues))

SpecialCells(xlCellTypeConstants, ((long)xlTextValues + (long)xlNumbers + (long)xlErrors + (long)xlLogical))

SpecialCells(xlCellTypeFormulas, ((long)xlTextValues + (long)xlNumbers + (long)xlErrors + (long)xlLogical))

Thoughts?

ΩmegaMan
  • 29,542
  • 12
  • 100
  • 122
  • **Which `XlCellType` are you trying to use?** It's important to include all relevant information and examples with questions. See [these tips](https://codeblog.jonskeet.uk/2010/08/29/writing-the-perfect-question/) and also "[mcve]". – ashleedawg Mar 06 '18 at 07:33
  • Isn't it `Range SpecialCells(XlCellType Type, Object Value)`? More [here](https://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel.range.specialcells.aspx?cs-save-lang=1&cs-lang=csharp#code-snippet-1). – AntiDrondert Mar 06 '18 at 07:40
  • You can probably an answer [here](https://stackoverflow.com/search?tab=votes&q=%5bc%23%5dSpecialCells%20) –  Mar 06 '18 at 07:42
  • Edit1 is done please look at problem again @ashleedawg we are using xlCellTypeConstants, xlCellsTypeFormulas, xlCellTypeLastCell – Pratap Singh Ranawat Mar 06 '18 at 08:10
  • we are using spreadsheetgear for excel @AntiDrondert – Pratap Singh Ranawat Mar 06 '18 at 08:10
  • we are using spreadsheetgear for excel @Jeeped – Pratap Singh Ranawat Mar 06 '18 at 08:10

0 Answers0