DevExpressSpreadSheet操作⽰例private void button1_Click(object nder, EventArgs e)
{
string fileName = string.Empty;
openFileDialog.Filter = "Excel ⼯作簿|*.xlsx|Excel(97-2003)⼯作簿|*.xls";
三为openFileDialog.RestoreDirectory = true;
lend过去式
blogif (openFileDialog.ShowDialog() != System.Windows.Forms.DialogResult.OK)
{
办公室潜规则return;
}
医务人员九不准
txtFilePath.Text = System.IO.Path.GetFullPath(openFileDialog.FileName);
sheetControl.LoadDocument(txtFilePath.Text);
形容淡定的成语
}
private void button2_Click(object nder, EventArgs e)
{
宁缺毋滥是什么意思Worksheet sheet = sheetControl.ActiveSheet as Worksheet;
var rowInfo= sheetControl.ActiveWorksheet.Rows;
Range range = sheetControl.ActiveWorksheet.GetDataRange();
for (int row = 0; row < range.RowCount; row++ )
{
for (int col = 0; col < range.ColumnCount; col++)
{
string s = sheetControl.ActiveWorksheet.GetCellValue(col, row).TextValue;
MessageBox.Show(s);
}立方体抗压强度
}
}