Convert Images To Excel

Words
154
Reading
1 min
Listen
Play
9y

I've designed this easy yet functional project for coders that do excel and c # related software. On the one hand, it is a study where they learn the coding between c # and excel while they have fun. I hope you will like it.
what does it do;
it fills your images with each pixel of excel in pixels and provides a fun situation.
An application to present your loved ones

Ways to Use:

Insert button
Using the if else loop
write a public method
write a function
Learn Bitmap
Open a new Form Item
hide the form
Using Checkbox
Using OpenFileDialog

Browser Button Code:

DialogResult dr = OpenFileDlg.ShowDialog();
           TxtFilePicked.Text = OpenFileDlg.FileName;

Draw Button Click Event Code:

string filNameOrigin = TxtFilePicked.Text;          
            if (TxtFilePicked.Text == "")
            {
                MessageBox.Show("You need to pick a image file first", "warning", MessageBoxButtons.OK);
                return;
            }

          int iColSpan=0;
         if (!Int32.TryParse(TxtColSpan.Text, out iColSpan) || iColSpan<10||iColSpan>500)
     {
          MessageBox.Show("Column span has to be an integer between 10 to 500", "warning", MessageBoxButtons.OK);
                return;
         }
         int iCellUnitHeight=0;
        if (!Int32.TryParse(TxtCellUnitHeight.Text, out iCellUnitHeight) || iCellUnitHeight < 10 || iCellUnitHeight > 20)
            {
                MessageBox.Show("Cell Unit Height has to be an integer between 10 to 20", "warning", MessageBoxButtons.OK);
                return;
            }

            Bitmap bitmapNewImg = ResizeImageWithRatio(filNameOrigin, iColSpan);
            if (bitmapNewImg != null)
            {
                ExcelProc(bitmapNewImg, iCellUnitHeight);
                bitmapNewImg.Dispose();
            }

**Clear Excel Button Click Event Code:**
 {
            DialogResult rsltYesNo = MessageBox.Show("This will clean all running Excel applications in memory (assume you already saved all your works). Continue?", "warning", MessageBoxButtons.YesNo);
            
            if (rsltYesNo == DialogResult.Yes)
            {
                var prs = Process.GetProcessesByName("EXCEL");
                foreach (Process p in prs)
                {
                    p.Kill();
                }

            }
        }

Use:
After you open the application, click on the browse option and select your picture and click the draw button. then wait until you click. Result.

Interface:

Github Project:
Github project.jpg

My Github Project Picture: Profile:

https://github.com/mrdmr/pc_shutdown_app


Posted on Utopian.io - Rewarding Open Source Contributors

Convert Images To Excel | Ecency