Skip to content

Instantly share code, notes, and snippets.

@Jia-Hong-Peng
Last active August 29, 2015 14:27
Show Gist options
  • Select an option

  • Save Jia-Hong-Peng/e4994ee9a364308942bd to your computer and use it in GitHub Desktop.

Select an option

Save Jia-Hong-Peng/e4994ee9a364308942bd to your computer and use it in GitHub Desktop.
測試產生excel
private void button1_Click(object sender, EventArgs e)
{
hssfworkbook = new HSSFWorkbook();
MemoryStream ms = new MemoryStream();
// 新增試算表。
hssfworkbook.CreateSheet("試算表 A");
hssfworkbook.CreateSheet("試算表 B");
hssfworkbook.CreateSheet("試算表 C");
hssfworkbook.Write(ms);
WriteToFile();
hssfworkbook = null;
ms.Close();
ms.Dispose();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment