private string GetFirstCell(string cellInMerageCells) { if (cellInMerageCells.IndexOf(":") > 0) { return(cellInMerageCells.Substring(0, cellInMerageCells.IndexOf(":"))); } OWC.Range mergeArea = this.GetRange(cellInMerageCells).MergeArea; if (mergeArea.Address.IndexOf(":") > 0) { return(mergeArea.Address.Substring(0, mergeArea.Address.IndexOf(":"))); } return(cellInMerageCells); }
private string GetCellValueEx(int row, int col) { if ((row < 1) || (col < 1)) { return(""); } OWC.Range mergeArea = this.axSpreadsheet1.ActiveSheet.UsedRange.get_Item(row, col).MergeArea; int index = mergeArea.Address.IndexOf(':'); if (index > 0) { return(this.GetRange(mergeArea.Address.Substring(0, index)).Text.ToString().Trim()); } return(mergeArea.Text.ToString().Trim()); }
public void SetFontColor(OWC.Range r, string color) { try { object obj2 = color; if (r.get_Locked().ToString() != "False") { r.set_Locked(false); r.Font.set_Color(ref obj2); r.set_Locked(true); } else { r.Font.set_Color(ref obj2); } } catch (Exception exception) { MessageBox.Show(exception.Message); } }
private void InitializeHistory() { this.lstHistory = new ArrayList(); OWC.Range after = this.GetRange(1, 1); Label_0014: after = this.Find("<修改记录>", after); if (after != null) { CLHistory history = new CLHistory(); try { PPCardCompiler.ExplainXml(after.Text.ToString(), history); } catch { goto Label_0014; } this.lstHistory.Add(history); goto Label_0014; } this.lstHistory.Sort(); }
private void InitializeProcess() { this.lstProcess = new ArrayList(); OWC.Range after = this.GetRange(1, 1); Label_0014: after = this.Find("<流程记录>", after); if (after == null) { return; } CLState state = new CLState { CellSign = after.Address }; try { PPCardCompiler.ExplainXml(after.Text.ToString(), state); } catch { goto Label_0014; } this.lstProcess.Add(state); goto Label_0014; }
private void SetColColor(int colStart, int colEnd, int row) { OWC.Range r = this.GetRange(PPCConvert.RowCol2Address(1, colStart), PPCConvert.RowCol2Address(row, colEnd)); this.SetFontColor(r, "Fuchsia"); }
private OWC.Range Find(string partValue, OWC.Range after) { return(this.axSpreadsheet1.ActiveSheet.UsedRange.Cells.Find(partValue, after, SheetFindLookInEnum.ssValues, SheetFindLookAtEnum.ssPart, SheetSearchOrderEnum.ssByRows, SheetSearchDirectionEnum.ssNext, false)); }
private void SetRowColor(int rowStart, int rowEnd, int col) { OWC.Range r = this.GetRange(PPCConvert.RowCol2Address(rowStart, 1), PPCConvert.RowCol2Address(rowEnd, col)); this.SetFontColor(r, "Fuchsia"); }