int StartBundleRow = 10; for (int BndlRow = 0; BndlRow < bundleRows; BndlRow++)//add rows to spreadsheet { worksheet.Rows[StartBundleRow].Insert(); worksheet.Rows[StartBundleRow].Font.Size = 14; worksheet.Rows[StartBundleRow].Font.Bold = true; worksheet.Rows[StartBundleRow].Interior.Color = CyberaWhite; worksheet.Columns["A"].Interior.Color = CyberaGrey; worksheet.Columns["J:XFD"].Interior.Color = CyberaGrey; worksheet.Cells[StartBundleRow, "C"].Interior.Color = CyberaPurple; worksheet.Rows[StartBundleRow].HorizontalAlignment = XlHAlign.xlHAlignLeft; worksheet.Cells[StartBundleRow, "D"].value = srcBundlePanel.Controls["txtQtyBundle" + BndlRow].Text; worksheet.Cells[StartBundleRow, "E"].value = srcBundlePanel.Controls["txtProductNameBundle" + BndlRow].Text; ----HERE IS WHERE I AM WORKING---- string DescriptionSplit = srcBundlePanel.Controls["txtProductDescBundle"].Text; string[] descriptionParts = DescriptionSplit.Split('|'); for (int i = 0; i < descriptionParts.Length; i++) { worksheet.Rows[StartBundleRow].Insert(); //applies the description for the default bundle row worksheet.Rows[StartBundleRow].Font.Bold = false; worksheet.Cells[StartBundleRow++, "E"].Value = rowIndent + descriptionParts[i].Trim(); ----TO HERE---- } worksheet.Cells[StartBundleRow, "F"].value = srcBundlePanel.Controls["txtListPriceBundle" + BndlRow].Text; worksheet.Cells[StartBundleRow, "G"].value = srcBundlePanel.Controls["txtMaxDiscountBundle" + BndlRow].Text; worksheet.Cells[StartBundleRow++, "H"].value = srcBundlePanel.Controls["txtProposedPriceBundle" + BndlRow].Text; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)