0

I am writing a barcode reader system with C# Form now. There is a part they asked me to do. I was doing operations such as exporting the data in the database to excel, importing the data in excel to the database. I got stuck on the photo thing. I could not export the photo saved in the database to excel. Can you help me how do I do it?

How do I upload photo from mssql to excel? is there a solution?

          using(SaveFileDialog sfd=new SaveFileDialog() { Filter="Excel Dosyasi|*.xlsx"})
          {
              if (sfd.ShowDialog()==DialogResult.OK)
              {
                  try
                  {
                      using(XLWorkbook workbook = new XLWorkbook())
                      {
                        
                        workbook.Worksheets.Add(this.appData.personel.CopyToDataTable(),"personel");
                          workbook.SaveAs(sfd.FileName);


                      }
                      MessageBox.Show("Başarılı bir şekilde kaydedildi","Message", MessageBoxButtons.OK,MessageBoxIcon.Information);

                  }
                  catch (Exception ex)
                  {
                      MessageBox.Show(ex.ToString());
                  }
              }   
          

0 Answers0