예제 #1
0
 private void btnRun_Click(object sender, System.EventArgs e)
 {
     oleDbConnection1.Open();
     try
     {
         if (lstStyles.SelectedIndex > 0)
         {
             htmlExport1.HtmlStyle = (Spire.DataExport.HTML.HtmlStyle)Enum.Parse(typeof(Spire.DataExport.HTML.HtmlStyle), lstStyles.SelectedItem.ToString());
         }
         htmlExport1.SaveToFile();
     }
     finally
     {
         this.oleDbConnection1.Close();
     }
 }
예제 #2
0
        private void btnRun_Click(object sender, System.EventArgs e)
        {
            oleDbConnection1.Open();
            try
            {
                switch (itemIndex)
                {
                case 1:
                    cellExport1.SaveToFile();
                    break;

                case 2:
                    htmlExport1.SaveToFile();
                    break;

                case 3:
                    pdfExport1.SaveToFile();
                    break;

                case 4:
                    rtfExport1.SaveToFile();
                    break;

                case 5:
                    clipboardExport1.SaveToFile();
                    break;

                case 6:
                    dbfExport1.SaveToFile();
                    break;

                case 7:
                    accessExport1.SaveToFile();
                    break;

                case 8:
                    xmlExport1.SaveToFile();
                    break;

                case 9:
                    sqlExport1.SaveToFile();
                    break;

                case 10:
                    txtExport1.ExportType = TextExportType.SYLK;
                    txtExport1.FileName   = "sample.slk";
                    txtExport1.SaveToFile();
                    break;

                case 11:
                    txtExport1.ExportType = TextExportType.CSV;
                    txtExport1.FileName   = "sample.csv";
                    txtExport1.SaveToFile();
                    break;

                case 12:
                    txtExport1.ExportType = TextExportType.DIF;
                    txtExport1.FileName   = "sample.dif";
                    txtExport1.SaveToFile();
                    break;

                case 13:
                    txtExport1.ExportType = TextExportType.TXT;
                    txtExport1.FileName   = "sample.txt";
                    txtExport1.SaveToFile();
                    break;
                }
            }finally
            {
                this.oleDbConnection1.Close();
            }
        }