// Create a new workbook Workbook workbook = new Workbook(); IWorksheet ws = workbook.getWorksheets().get("Sheet1"); String rngB1 = "Document Solutions for Excel Product Feedback - Form Controls"; ws.getRange("$B$1").setValue(rngB1); Object rngB3I3 = new Object[][] { { "Please take a moment to let us know your feedback about Form Controls in Document Solutions for Excel. Your feedback is valuable and will help us to improve our product and better serve our customers.", null, null, null, null, null, null, null} }; ws.getRange("$B$3:$I$3").setValue(rngB3I3); String rngB5 = "1. How difficult is it to use the Form Controls in Document Solutions for Excel?"; ws.getRange("$B$5").setValue(rngB5); Object rngD7I7 = new Object[][] { { "Very difficult", "Difficult", "Neutral", "Easy", "Very easy", "I've never tried to use the feature because I don't know how."} }; ws.getRange("$D$7:$I$7").setValue(rngD7I7); Object rngB8B13 = new Object[][] { { "Create and initialize controls"}, { "Access controls in a worksheet"}, { "Read/write properties"}, { "Copy/cut controls"}, { "Range based data binding"}, { "Port existing code that uses Excel Form Controls"} }; ws.getRange("$B$8:$B$13").setValue(rngB8B13); String rngB15 = "2. What new features would you like to see in the Form Controls in Document Solutions for Excel?"; ws.getRange("$B$15").setValue(rngB15); String rngB21 = "3. Please rank the following in order of importance"; ws.getRange("$B$21").setValue(rngB21); Object rngB23C25 = new Object[][] { { 1d, "Compatibility of files exported by Microsoft Excel"}, { 2d, "New features"}, { 3d, "Performance"} }; ws.getRange("$B$23:$C$25").setValue(rngB23C25); String rngB27 = "4. Which programming language are you primarily using to access Form Controls with Document Solutions for Excel?"; ws.getRange("$B$27").setValue(rngB27); Object rngI28I30 = new Object[][] { { ".NET languages (C#, VB.NET, F#, C++/CLI,...)"}, { "JVM languages (Java, Kotlin,...)"}, { "Scripting languages (PowerShell, Python,...)"} }; ws.getRange("$I$28:$I$30").setValue(rngI28I30); String rngE29 = "Other:"; ws.getRange("$E$29").setValue(rngE29); String rngB31 = "5. Would you like to suggest this feature to your colleagues?"; ws.getRange("$B$31").setValue(rngB31); Object rngA33B33 = new Object[][] { { 5d, "Very unlikely"} }; ws.getRange("$A$33:$B$33").setValue(rngA33B33); String rngI33 = "Very likely"; ws.getRange("$I$33").setValue(rngI33); Object rngB37I37 = new Object[][] { { "6. Thank you for taking our survey. Your feedback is important and will help us create a better product for you and other developers.", null, null, null, null, null, null, null} }; ws.getRange("$B$37:$I$37").setValue(rngB37I37); String rngB39 = "Name"; ws.getRange("$B$39").setValue(rngB39); String rngB41 = "Email"; ws.getRange("$B$41").setValue(rngB41); IRange style1 = ws.getRange("$A$8:$A$13,$A$29,$E$32,$A$33"); style1.setNumberFormat(";;;"); IRange style2 = ws.getRange("$B$23:$B$25"); style2.setNumberFormat("\"P\"0"); IFont style3 = ws.getRange("$B$1:$I$1").getFont(); style3.setThemeColor(ThemeColor.Dark2); style3.setBold(true); style3.setSize(15d); IFont style4 = ws.getRange("$B$5:$I$5,$B$15:$I$15,$B$21:$I$21,$B$27:$I$27,$B$31:$I$31,$B$37:$I$37").getFont(); style4.setThemeColor(ThemeColor.Dark2); style4.setBold(true); style4.setSize(13d); IFont style5 = ws.getRange("$I$28:$I$30").getFont(); style5.setThemeColor(ThemeColor.Light1); IBorders style6 = ws.getRange("$B$1:$I$1").getBorders(); style6.get(BordersIndex.EdgeBottom).setThemeColor(ThemeColor.Accent1); style6.get(BordersIndex.EdgeBottom).setLineStyle(BorderLineStyle.Thick); IBorders style7 = ws.getRange("$B$5:$I$5,$B$15:$I$15,$B$21:$I$21,$B$27:$I$27,$B$31:$I$31,$B$37:$I$37").getBorders(); style7.get(BordersIndex.EdgeBottom).setThemeColor(ThemeColor.Accent1); style7.get(BordersIndex.EdgeBottom).setLineStyle(BorderLineStyle.Thick); IBorders style8 = ws.getRange("$C$39,$C$41").getBorders(); style8.get(BordersIndex.EdgeBottom).setThemeColor(ThemeColor.Light2); style8.get(BordersIndex.EdgeBottom).setLineStyle(BorderLineStyle.Medium); style8.get(BordersIndex.EdgeLeft).setThemeColor(ThemeColor.Light2); style8.get(BordersIndex.EdgeLeft).setLineStyle(BorderLineStyle.Medium); style8.get(BordersIndex.EdgeRight).setThemeColor(ThemeColor.Light2); style8.get(BordersIndex.EdgeRight).setLineStyle(BorderLineStyle.Medium); style8.get(BordersIndex.EdgeTop).setThemeColor(ThemeColor.Light2); style8.get(BordersIndex.EdgeTop).setLineStyle(BorderLineStyle.Medium); IBorders style9 = ws.getRange("$E$19,$F$29").getBorders(); style9.get(BordersIndex.EdgeBottom).setThemeColor(ThemeColor.Light2); style9.get(BordersIndex.EdgeBottom).setLineStyle(BorderLineStyle.Medium); style9.get(BordersIndex.EdgeLeft).setThemeColor(ThemeColor.Light2); style9.get(BordersIndex.EdgeLeft).setLineStyle(BorderLineStyle.Medium); style9.get(BordersIndex.EdgeTop).setThemeColor(ThemeColor.Light2); style9.get(BordersIndex.EdgeTop).setLineStyle(BorderLineStyle.Medium); IBorders style10 = ws.getRange("$F$19,$G$29").getBorders(); style10.get(BordersIndex.EdgeBottom).setThemeColor(ThemeColor.Light2); style10.get(BordersIndex.EdgeBottom).setLineStyle(BorderLineStyle.Medium); style10.get(BordersIndex.EdgeTop).setThemeColor(ThemeColor.Light2); style10.get(BordersIndex.EdgeTop).setLineStyle(BorderLineStyle.Medium); IBorders style11 = ws.getRange("$G$19,$H$29").getBorders(); style11.get(BordersIndex.EdgeBottom).setThemeColor(ThemeColor.Light2); style11.get(BordersIndex.EdgeBottom).setLineStyle(BorderLineStyle.Medium); style11.get(BordersIndex.EdgeRight).setThemeColor(ThemeColor.Light2); style11.get(BordersIndex.EdgeRight).setLineStyle(BorderLineStyle.Medium); style11.get(BordersIndex.EdgeTop).setThemeColor(ThemeColor.Light2); style11.get(BordersIndex.EdgeTop).setLineStyle(BorderLineStyle.Medium); IRange style12 = ws.getRange("$B$3:$I$3"); style12.setHorizontalAlignment(HorizontalAlignment.Left); style12.setVerticalAlignment(VerticalAlignment.Center); style12.setWrapText(true); style12.setAddIndent(false); IRange style13 = ws.getRange("$B$8,$C$23:$C$25,$E$29"); style13.setVerticalAlignment(VerticalAlignment.Center); style13.setAddIndent(false); IRange style14 = ws.getRange("$B$9:$B$13,$B$23:$B$25"); style14.setHorizontalAlignment(HorizontalAlignment.Left); style14.setVerticalAlignment(VerticalAlignment.Center); style14.setAddIndent(false); IRange style15 = ws.getRange("$B$37:$I$37"); style15.setHorizontalAlignment(HorizontalAlignment.Left); style15.setWrapText(true); style15.setAddIndent(false); IRange style16 = ws.getRange("$D$7:$H$7,$E$19:$G$19,$F$29:$H$29"); style16.setHorizontalAlignment(HorizontalAlignment.Center); style16.setAddIndent(false); IRange style17 = ws.getRange("$I$7"); style17.setWrapText(true); style17.setAddIndent(false); ws.getRange("$B$3:$I$3").merge(); ws.getRange("$E$19:$G$19").merge(); ws.getRange("$B$37:$I$37").merge(); ws.getRange("$F$29:$H$29").merge(); ws.getRange("$1:$1").setRowHeight(20.4d); ws.getRange("$3:$3").setRowHeight(32.4d); ws.getRange("$5:$5,$15:$15,$27:$27,$31:$31").setRowHeight(18d); ws.getRange("$7:$7").setRowHeight(57.6d); ws.getRange("$8:$9,$11:$13").setRowHeight(24d); ws.getRange("$10:$10").setRowHeight(25.2d); ws.getRange("$17:$21,$39:$39").setRowHeight(18.6d); ws.getRange("$23:$25").setRowHeight(24.6d); ws.getRange("$28:$28,$38:$38").setRowHeight(15.6d); ws.getRange("$29:$29").setRowHeight(27d); ws.getRange("$37:$37").setRowHeight(37.8d); ws.getRange("$40:$40").setRowHeight(10.2d); ws.getRange("$41:$41").setRowHeight(19.8d); ws.getRange("$A:$A").setColumnWidthInPixel(36d); ws.getRange("$B:$B").setColumnWidthInPixel(57d); ws.getRange("$C:$C").setColumnWidthInPixel(260d); ws.getRange("$D:$D").setColumnWidthInPixel(107d); ws.getRange("$I:$I").setColumnWidthInPixel(139d); ws.getRange("$J:$J").setColumnWidthInPixel(48d); // Group: Create and initialize controls ws.getControls().addGroupBox(266.55, 175.8, 370, 20.4).setText(""); ws.getControls().addOptionButton(299.95, 178.2, 26.4, 16.19).setText(""); ws.getControls().addOptionButton(361.8, 178.2, 26.39, 16.19).setText(""); ws.getControls().addOptionButton(407.8, 178.2, 26.39, 16.19).setText(""); ws.getControls().addOptionButton(455.2, 177.6, 26.4, 16.2).setText(""); ws.getControls().addOptionButton(507.4, 178.2, 23.39, 16.19).setText(""); IOptionButton optA8 = ws.getControls().addOptionButton(580, 177.6, 26.39, 16.2); optA8.setLinkedCell(ws.getRange("$A$8")); optA8.setText(""); // Group: Access controls in a worksheet ws.getControls().addGroupBox(266.55, 199.8, 370, 20.4).setText(""); ws.getControls().addOptionButton(299.95, 202.2, 26.39, 16.19).setText(""); ws.getControls().addOptionButton(361.8, 202.2, 26.39, 16.19).setText(""); ws.getControls().addOptionButton(407.8, 202.2, 26.39, 16.19).setText(""); ws.getControls().addOptionButton(455.2, 201.6, 26.39, 16.19).setText(""); ws.getControls().addOptionButton(507.4, 202.2, 23.39, 16.19).setText(""); IOptionButton optA9 = ws.getControls().addOptionButton(580, 201.6, 26.39, 16.19); optA9.setLinkedCell(ws.getRange("$A$9")); optA9.setText(""); // Group: Read/write properties ws.getControls().addGroupBox(266.55, 223.8, 370, 20.4).setText(""); ws.getControls().addOptionButton(299.95, 226.2, 26.39, 16.19).setText(""); ws.getControls().addOptionButton(361.8, 226.2, 26.39, 16.19).setText(""); ws.getControls().addOptionButton(407.8, 226.2, 26.39, 16.19).setText(""); ws.getControls().addOptionButton(455.2, 225.6, 26.39, 16.19).setText(""); ws.getControls().addOptionButton(507.4, 226.2, 23.39, 16.19).setText(""); IOptionButton optA10 = ws.getControls().addOptionButton(580, 225.6, 26.39, 16.19); optA10.setLinkedCell(ws.getRange("$A$10")); optA10.setText(""); // Group: Copy/cut controls ws.getControls().addGroupBox(266.55, 249, 370, 20.39).setText(""); ws.getControls().addOptionButton(299.95, 251.4, 26.39, 16.2).setText(""); ws.getControls().addOptionButton(361.8, 251.4, 26.39, 16.2).setText(""); ws.getControls().addOptionButton(407.8, 251.4, 26.39, 16.2).setText(""); ws.getControls().addOptionButton(455.2, 250.79, 26.39, 16.2).setText(""); ws.getControls().addOptionButton(507.4, 251.4, 23.39, 16.2).setText(""); IOptionButton optA11 = ws.getControls().addOptionButton(580, 250.79, 26.39, 16.2); optA11.setLinkedCell(ws.getRange("$A$11")); optA11.setText(""); // Group: Range based data binding ws.getControls().addGroupBox(266.55, 273, 370, 20.4).setText(""); ws.getControls().addOptionButton(299.95, 275.4, 26.39, 16.2).setText(""); ws.getControls().addOptionButton(361.8, 275.4, 26.39, 16.2).setText(""); ws.getControls().addOptionButton(407.8, 275.4, 26.39, 16.2).setText(""); ws.getControls().addOptionButton(455.2, 274.8, 26.39, 16.2).setText(""); ws.getControls().addOptionButton(507.4, 275.4, 23.39, 16.2).setText(""); IOptionButton optA12 = ws.getControls().addOptionButton(580, 274.8, 26.39, 16.2); optA12.setLinkedCell(ws.getRange("$A$12")); optA12.setText(""); // Group: Port existing code that uses Excel Form Controls ws.getControls().addGroupBox(266.55, 297, 370, 20.4).setText(""); ws.getControls().addOptionButton(299.95, 299.4, 26.39, 16.2).setText(""); ws.getControls().addOptionButton(361.8, 299.4, 26.39, 16.2).setText(""); ws.getControls().addOptionButton(407.8, 299.4, 26.39, 16.2).setText(""); ws.getControls().addOptionButton(455.2, 298.8, 26.39, 16.2).setText(""); ws.getControls().addOptionButton(507.4, 299.4, 23.39, 16.2).setText(""); IOptionButton optA13 = ws.getControls().addOptionButton(580, 298.8, 26.39, 16.2); optA13.setLinkedCell(ws.getRange("$A$13")); optA13.setText(""); ICheckBox ctl29 = ws.getControls().addCheckBox(28.8, 367.20, 66.75, 16.79); ctl29.setText("Rich text"); ICheckBox ctl30 = ws.getControls().addCheckBox(29.4, 385.80, 151.35, 16.79); ctl30.setText("Styles, such as color and lines"); ICheckBox ctl31 = ws.getControls().addCheckBox(29.4, 405.00, 151.35, 16.80); ctl31.setText("Scale"); ICheckBox ctl32 = ws.getControls().addCheckBox(174.15, 367.8, 175.04, 16.80); ctl32.setText("Alternative text"); ICheckBox ctl33 = ws.getControls().addCheckBox(174.15, 385.20, 175.04, 16.80); ctl33.setText("Grouping"); ICheckBox ctl34 = ws.getControls().addCheckBox(174.15, 404.40, 175.04, 16.79); ctl34.setText("Attach to macros"); ICheckBox ctl35 = ws.getControls().addCheckBox(345.6, 367.8, 165, 16.80); ctl35.setText("Use formula in buttons"); ICheckBox ctl36 = ws.getControls().addCheckBox(345.6, 385.80, 165, 16.79); ctl36.setText("Other (please specify)"); ISpinner ctl37 = ws.getControls().addSpinner(45.6, 476.40, 17.4, 21); ctl37.setMax(3); ctl37.setMin(1); ctl37.setSmallChange(1); ctl37.setLinkedCell(ws.getRange("$B$23")); ctl37.setValue(1); ISpinner ctl38 = ws.getControls().addSpinner(45.6, 501.00, 17.4, 20.99); ctl38.setMax(3); ctl38.setMin(1); ctl38.setSmallChange(1); ctl38.setLinkedCell(ws.getRange("$B$24")); ctl38.setValue(2); ISpinner ctl39 = ws.getControls().addSpinner(45.6, 525.60, 17.4, 21); ctl39.setMax(3); ctl39.setMin(1); ctl39.setSmallChange(1); ctl39.setLinkedCell(ws.getRange("$B$25")); ctl39.setValue(3); IDropDown ctl54 = ws.getControls().addDropDown(30, 599.40, 213.15, 20.39); ctl54.setDropDownLines(3); ctl54.setItemsSourceRange(ws.getRange("$I$28:$I$30")); ctl54.setSelectedIndex(-1); ctl54.setLinkedCell(ws.getRange("$A$29")); ctl54.setValue(0); IScrollBar ctl55 = ws.getControls().addScrollBar(31.2, 690.60, 576, 24.60); ctl55.setLargeChange(1); ctl55.setOrientation(FormControlOrientation.Horizontal); ctl55.setMax(10); ctl55.setMin(0); ctl55.setSmallChange(1); ctl55.setLinkedCell(ws.getRange("$A$33")); ctl55.setValue(8); IButton ctl56 = ws.getControls().addButton(265.35, 851.40, 127.04, 45); ctl56.setHorizontalTextAlignment(HorizontalAlignment.Center); ctl56.setOrientation(TickLabelOrientation.OrientationHorizontal); ctl56.setVerticalTextAlignment(VerticalAlignment.Center); ctl56.setDefaultButton(true); ctl56.setText("Submit"); ILabel ctl57 = ws.getControls().addLabel(292.35, 671.40, 60.60, 18.00); ctl57.setText("I'm not sure"); ILabel ctl58 = ws.getControls().addLabel(433.8, 672.60, 66.59, 18.60); ctl58.setText("Likely"); ILabel ctl59 = ws.getControls().addLabel(143.55, 672.00, 60.59, 18.60); ctl59.setText("Unlikely"); // Save to an excel file workbook.save("FeedbackForm.xlsx");
// Create a new workbook var workbook = Workbook() val ws = workbook.worksheets["Sheet1"] val rngB1 = "Document Solutions for Excel Product Feedback - Form controls" ws.getRange("\$B$1").value = rngB1 val rngB3I3: Any = arrayOf( arrayOf( "Please take a moment to let us know your feedback about Form controls in Document Solutions for Excel. Your feedback is valuable and will help us to improve our product and better serve our customers.", null, null, null, null, null, null, null ) ) ws.getRange("\$B$3:\$I$3").value = rngB3I3 val rngB5 = "1. How difficult is it to use the form controls in Document Solutions for Excel?" ws.getRange("\$B$5").value = rngB5 val rngD7I7: Any = arrayOf( arrayOf( "Very difficult", "Difficult", "Neutral", "Easy", "Very easy", "I've never tried to use the feature because I don't know how." ) ) ws.getRange("\$D$7:\$I$7").value = rngD7I7 val rngB8B13: Any = arrayOf( arrayOf("Create and initialize controls"), arrayOf("Access controls in a worksheet"), arrayOf("Read/write properties"), arrayOf("Copy/cut controls"), arrayOf("Range based data binding"), arrayOf("Port existing code that uses Excel form controls") ) ws.getRange("\$B$8:\$B$13").value = rngB8B13 val rngB15 = "2. What new features would you like to see in the form controls in Document Solutions for Excel?" ws.getRange("\$B$15").value = rngB15 val rngB21 = "3. Please rank the following in order of importance" ws.getRange("\$B$21").value = rngB21 val rngB23C25: Any = arrayOf( arrayOf(1.0, "Compatibility of files exported by Microsoft Excel"), arrayOf(2.0, "New features"), arrayOf(3.0, "Performance") ) ws.getRange("\$B$23:\$C$25").value = rngB23C25 val rngB27 = "4. Which programming language are you primarily using to access form controls with Document Solutions for Excel?" ws.getRange("\$B$27").value = rngB27 val rngI28I30: Any = arrayOf( arrayOf(".NET languages (C#, VB.NET, F#, C++/CLI,...)"), arrayOf("JVM languages (Java, Kotlin,...)"), arrayOf("Scripting languages (PowerShell, IronPython,...)") ) ws.getRange("\$I$28:\$I$30").value = rngI28I30 val rngE29 = "Other:" ws.getRange("\$E$29").value = rngE29 val rngB31 = "5. Would you like to suggest this feature to your colleagues?" ws.getRange("\$B$31").value = rngB31 val rngA33B33: Any = arrayOf(arrayOf(5.0, "Very unlikely")) ws.getRange("\$A$33:\$B$33").value = rngA33B33 val rngI33 = "Very likely" ws.getRange("\$I$33").value = rngI33 val rngB37I37: Any = arrayOf( arrayOf( "6. Thank you for taking our survey. Your feedback is important and will help us create a better product for you and other developers.", null, null, null, null, null, null, null ) ) ws.getRange("\$B$37:\$I$37").value = rngB37I37 val rngB39 = "Name" ws.getRange("\$B$39").value = rngB39 val rngB41 = "Email" ws.getRange("\$B$41").value = rngB41 val style1 = ws.getRange("\$A$8:\$A$13,\$A$29,\$E$32,\$A$33") style1.numberFormat = ";;;" val style2 = ws.getRange("\$B$23:\$B$25") style2.numberFormat = "\"P\"0" val style3 = ws.getRange("\$B$1:\$I$1").font style3.themeColor = ThemeColor.Dark2 style3.bold = true style3.size = 15.0 val style4 = ws.getRange("\$B$5:\$I$5,\$B$15:\$I$15,\$B$21:\$I$21,\$B$27:\$I$27,\$B$31:\$I$31,\$B$37:\$I$37").font style4.themeColor = ThemeColor.Dark2 style4.bold = true style4.size = 13.0 val style5 = ws.getRange("\$I$28:\$I$30").font style5.themeColor = ThemeColor.Light1 val style6 = ws.getRange("\$B$1:\$I$1").borders style6[BordersIndex.EdgeBottom].themeColor = ThemeColor.Accent1 style6[BordersIndex.EdgeBottom].lineStyle = BorderLineStyle.Thick val style7 = ws.getRange("\$B$5:\$I$5,\$B$15:\$I$15,\$B$21:\$I$21,\$B$27:\$I$27,\$B$31:\$I$31,\$B$37:\$I$37").borders style7[BordersIndex.EdgeBottom].themeColor = ThemeColor.Accent1 style7[BordersIndex.EdgeBottom].lineStyle = BorderLineStyle.Thick val style8 = ws.getRange("\$C$39,\$C$41").borders style8[BordersIndex.EdgeBottom].themeColor = ThemeColor.Light2 style8[BordersIndex.EdgeBottom].lineStyle = BorderLineStyle.Medium style8[BordersIndex.EdgeLeft].themeColor = ThemeColor.Light2 style8[BordersIndex.EdgeLeft].lineStyle = BorderLineStyle.Medium style8[BordersIndex.EdgeRight].themeColor = ThemeColor.Light2 style8[BordersIndex.EdgeRight].lineStyle = BorderLineStyle.Medium style8[BordersIndex.EdgeTop].themeColor = ThemeColor.Light2 style8[BordersIndex.EdgeTop].lineStyle = BorderLineStyle.Medium val style9 = ws.getRange("\$E$19,\$F$29").borders style9[BordersIndex.EdgeBottom].themeColor = ThemeColor.Light2 style9[BordersIndex.EdgeBottom].lineStyle = BorderLineStyle.Medium style9[BordersIndex.EdgeLeft].themeColor = ThemeColor.Light2 style9[BordersIndex.EdgeLeft].lineStyle = BorderLineStyle.Medium style9[BordersIndex.EdgeTop].themeColor = ThemeColor.Light2 style9[BordersIndex.EdgeTop].lineStyle = BorderLineStyle.Medium val style10 = ws.getRange("\$F$19,\$G$29").borders style10[BordersIndex.EdgeBottom].themeColor = ThemeColor.Light2 style10[BordersIndex.EdgeBottom].lineStyle = BorderLineStyle.Medium style10[BordersIndex.EdgeTop].themeColor = ThemeColor.Light2 style10[BordersIndex.EdgeTop].lineStyle = BorderLineStyle.Medium val style11 = ws.getRange("\$G$19,\$H$29").borders style11[BordersIndex.EdgeBottom].themeColor = ThemeColor.Light2 style11[BordersIndex.EdgeBottom].lineStyle = BorderLineStyle.Medium style11[BordersIndex.EdgeRight].themeColor = ThemeColor.Light2 style11[BordersIndex.EdgeRight].lineStyle = BorderLineStyle.Medium style11[BordersIndex.EdgeTop].themeColor = ThemeColor.Light2 style11[BordersIndex.EdgeTop].lineStyle = BorderLineStyle.Medium val style12 = ws.getRange("\$B$3:\$I$3") style12.horizontalAlignment = HorizontalAlignment.Left style12.verticalAlignment = VerticalAlignment.Center style12.wrapText = true style12.addIndent = false val style13 = ws.getRange("\$B$8,\$C$23:\$C$25,\$E$29") style13.verticalAlignment = VerticalAlignment.Center style13.addIndent = false val style14 = ws.getRange("\$B$9:\$B$13,\$B$23:\$B$25") style14.horizontalAlignment = HorizontalAlignment.Left style14.verticalAlignment = VerticalAlignment.Center style14.addIndent = false val style15 = ws.getRange("\$B$37:\$I$37") style15.horizontalAlignment = HorizontalAlignment.Left style15.wrapText = true style15.addIndent = false val style16 = ws.getRange("\$D$7:\$H$7,\$E$19:\$G$19,\$F$29:\$H$29") style16.horizontalAlignment = HorizontalAlignment.Center style16.addIndent = false val style17 = ws.getRange("\$I$7") style17.wrapText = true style17.addIndent = false ws.getRange("\$B$3:\$I$3").merge() ws.getRange("\$E$19:\$G$19").merge() ws.getRange("\$B$37:\$I$37").merge() ws.getRange("\$F$29:\$H$29").merge() ws.getRange("$1:$1").rowHeight = 20.4 ws.getRange("$3:$3").rowHeight = 32.4 ws.getRange("$5:$5,$15:$15,$27:$27,$31:$31").rowHeight = 18.0 ws.getRange("$7:$7").rowHeight = 57.6 ws.getRange("$8:$9,$11:$13").rowHeight = 24.0 ws.getRange("$10:$10").rowHeight = 25.2 ws.getRange("$17:$21,$39:$39").rowHeight = 18.6 ws.getRange("$23:$25").rowHeight = 24.6 ws.getRange("$28:$28,$38:$38").rowHeight = 15.6 ws.getRange("$29:$29").rowHeight = 27.0 ws.getRange("$37:$37").rowHeight = 37.8 ws.getRange("$40:$40").rowHeight = 10.2 ws.getRange("$41:$41").rowHeight = 19.8 ws.getRange("\$A:\$A").columnWidthInPixel = 36.0 ws.getRange("\$B:\$B").columnWidthInPixel = 57.0 ws.getRange("\$C:\$C").columnWidthInPixel = 260.0 ws.getRange("\$D:\$D").columnWidthInPixel = 107.0 ws.getRange("\$I:\$I").columnWidthInPixel = 139.0 ws.getRange("\$J:\$J").columnWidthInPixel = 48.0 val ctl1 = ws.controls.addOptionButton(580.0, 177.6, 26.39, 16.20) ctl1.linkedCell = ws.getRange("\$A$8") ctl1.text = "" val ctl2 = ws.controls.addOptionButton(299.95, 178.20, 26.40, 16.19) ctl2.linkedCell = ws.getRange("\$A$8") ctl2.text = "" val ctl3 = ws.controls.addOptionButton(361.8, 178.20, 26.39, 16.19) ctl3.linkedCell = ws.getRange("\$A$8") ctl3.text = "" val ctl4 = ws.controls.addOptionButton(407.8, 178.20, 26.39, 16.19) ctl4.linkedCell = ws.getRange("\$A$8") ctl4.text = "" val ctl5 = ws.controls.addOptionButton(455.2, 177.6, 26.40, 16.20) ctl5.linkedCell = ws.getRange("\$A$8") ctl5.text = "" val ctl6 = ws.controls.addGroupBox(266.55, 175.8, 370.0, 20.40) ctl6.text = "" val ctl7 = ws.controls.addOptionButton(507.4, 178.20, 23.39, 16.19) ctl7.linkedCell = ws.getRange("\$A$8") ctl7.text = "" val ctl8 = ws.controls.addOptionButton(580.0, 201.6, 26.39, 16.19) ctl8.linkedCell = ws.getRange("\$A$9") ctl8.text = "" val ctl9 = ws.controls.addOptionButton(299.95, 202.20, 26.39, 16.19) ctl9.linkedCell = ws.getRange("\$A$9") ctl9.text = "" val ctl10 = ws.controls.addOptionButton(361.8, 202.20, 26.39, 16.19) ctl10.linkedCell = ws.getRange("\$A$9") ctl10.text = "" val ctl11 = ws.controls.addOptionButton(407.8, 202.20, 26.39, 16.19) ctl11.linkedCell = ws.getRange("\$A$9") ctl11.text = "" val ctl12 = ws.controls.addOptionButton(455.2, 201.6, 26.39, 16.19) ctl12.linkedCell = ws.getRange("\$A$9") ctl12.text = "" val ctl13 = ws.controls.addGroupBox(266.55, 199.8, 370.0, 20.40) ctl13.text = "" val ctl14 = ws.controls.addOptionButton(507.4, 202.20, 23.39, 16.19) ctl14.linkedCell = ws.getRange("\$A$9") ctl14.text = "" val ctl15 = ws.controls.addOptionButton(580.0, 225.6, 26.39, 16.19) ctl15.linkedCell = ws.getRange("\$A$10") ctl15.text = "" val ctl16 = ws.controls.addOptionButton(299.95, 226.20, 26.39, 16.19) ctl16.linkedCell = ws.getRange("\$A$10") ctl16.text = "" val ctl17 = ws.controls.addOptionButton(361.8, 226.20, 26.39, 16.19) ctl17.linkedCell = ws.getRange("\$A$10") ctl17.text = "" val ctl18 = ws.controls.addOptionButton(407.8, 226.20, 26.39, 16.19) ctl18.linkedCell = ws.getRange("\$A$10") ctl18.text = "" val ctl19 = ws.controls.addOptionButton(455.2, 225.6, 26.39, 16.19) ctl19.linkedCell = ws.getRange("\$A$10") ctl19.text = "" val ctl20 = ws.controls.addGroupBox(266.55, 223.8, 370.0, 20.40) ctl20.text = "" val ctl21 = ws.controls.addOptionButton(507.4, 226.20, 23.39, 16.19) ctl21.linkedCell = ws.getRange("\$A$10") ctl21.text = "" val ctl22 = ws.controls.addOptionButton(580.0, 250.79, 26.39, 16.20) ctl22.linkedCell = ws.getRange("\$A$11") ctl22.text = "" val ctl23 = ws.controls.addOptionButton(299.95, 251.4, 26.39, 16.20) ctl23.linkedCell = ws.getRange("\$A$11") ctl23.text = "" val ctl24 = ws.controls.addOptionButton(361.8, 251.4, 26.39, 16.20) ctl24.linkedCell = ws.getRange("\$A$11") ctl24.text = "" val ctl25 = ws.controls.addOptionButton(407.8, 251.4, 26.39, 16.20) ctl25.linkedCell = ws.getRange("\$A$11") ctl25.text = "" val ctl26 = ws.controls.addOptionButton(455.2, 250.79, 26.39, 16.20) ctl26.linkedCell = ws.getRange("\$A$11") ctl26.text = "" val ctl27 = ws.controls.addGroupBox(266.55, 249.0, 370.0, 20.39) ctl27.text = "" val ctl28 = ws.controls.addOptionButton(507.4, 251.4, 23.39, 16.20) ctl28.linkedCell = ws.getRange("\$A$11") ctl28.text = "" val ctl29 = ws.controls.addCheckBox(28.8, 367.20, 66.75, 16.79) ctl29.text = "Rich text" val ctl30 = ws.controls.addCheckBox(29.4, 385.80, 151.35, 16.79) ctl30.text = "Styles, such as color and lines" val ctl31 = ws.controls.addCheckBox(29.4, 405.00, 151.35, 16.80) ctl31.text = "Scale" val ctl32 = ws.controls.addCheckBox(174.15, 367.8, 175.04, 16.80) ctl32.text = "Alternative text" val ctl33 = ws.controls.addCheckBox(174.15, 385.20, 175.04, 16.80) ctl33.text = "Grouping" val ctl34 = ws.controls.addCheckBox(174.15, 404.40, 175.04, 16.79) ctl34.text = "Attach to macros" val ctl35 = ws.controls.addCheckBox(345.6, 367.8, 165.0, 16.80) ctl35.text = "Use formula in buttons" val ctl36 = ws.controls.addCheckBox(345.6, 385.80, 165.0, 16.79) ctl36.text = "Other (please specify)" val ctl37 = ws.controls.addSpinner(45.6, 476.40, 17.4, 21.0) ctl37.max = 3 ctl37.min = 1 ctl37.smallChange = 1 ctl37.linkedCell = ws.getRange("\$B$23") ctl37.value = 1 val ctl38 = ws.controls.addSpinner(45.6, 501.00, 17.4, 20.99) ctl38.max = 3 ctl38.min = 1 ctl38.smallChange = 1 ctl38.linkedCell = ws.getRange("\$B$24") ctl38.value = 2 val ctl39 = ws.controls.addSpinner(45.6, 525.60, 17.4, 21.0) ctl39.max = 3 ctl39.min = 1 ctl39.smallChange = 1 ctl39.linkedCell = ws.getRange("\$B$25") ctl39.value = 3 val ctl40 = ws.controls.addOptionButton(580.0, 298.8, 26.39, 16.20) ctl40.linkedCell = ws.getRange("\$A$13") ctl40.text = "" val ctl41 = ws.controls.addOptionButton(299.95, 299.40, 26.39, 16.20) ctl41.linkedCell = ws.getRange("\$A$13") ctl41.text = "" val ctl42 = ws.controls.addOptionButton(361.8, 299.40, 26.39, 16.20) ctl42.linkedCell = ws.getRange("\$A$13") ctl42.text = "" val ctl43 = ws.controls.addOptionButton(407.8, 299.40, 26.39, 16.20) ctl43.linkedCell = ws.getRange("\$A$13") ctl43.text = "" val ctl44 = ws.controls.addOptionButton(455.2, 298.8, 26.39, 16.20) ctl44.linkedCell = ws.getRange("\$A$13") ctl44.text = "" val ctl45 = ws.controls.addGroupBox(266.55, 297.0, 370.0, 20.40) ctl45.text = "" val ctl46 = ws.controls.addOptionButton(507.4, 299.40, 23.39, 16.20) ctl46.linkedCell = ws.getRange("\$A$13") ctl46.text = "" val ctl47 = ws.controls.addOptionButton(580.0, 274.8, 26.39, 16.20) ctl47.linkedCell = ws.getRange("\$A$12") ctl47.text = "" val ctl48 = ws.controls.addOptionButton(299.95, 275.40, 26.39, 16.20) ctl48.linkedCell = ws.getRange("\$A$12") ctl48.text = "" val ctl49 = ws.controls.addOptionButton(361.8, 275.40, 26.39, 16.20) ctl49.linkedCell = ws.getRange("\$A$12") ctl49.text = "" val ctl50 = ws.controls.addOptionButton(407.8, 275.40, 26.39, 16.20) ctl50.linkedCell = ws.getRange("\$A$12") ctl50.text = "" val ctl51 = ws.controls.addOptionButton(455.2, 274.8, 26.39, 16.20) ctl51.linkedCell = ws.getRange("\$A$12") ctl51.text = "" val ctl52 = ws.controls.addGroupBox(266.55, 273.0, 370.0, 20.40) ctl52.text = "" val ctl53 = ws.controls.addOptionButton(507.4, 275.40, 23.39, 16.20) ctl53.linkedCell = ws.getRange("\$A$12") ctl53.text = "" val ctl54 = ws.controls.addDropDown(30.0, 599.40, 213.15, 20.39) ctl54.dropDownLines = 3 ctl54.itemsSourceRange = ws.getRange("\$I$28:\$I$30") ctl54.selectedIndex = -1 ctl54.linkedCell = ws.getRange("\$A$29") ctl54.value = 0 val ctl55 = ws.controls.addScrollBar(31.2, 690.60, 576.0, 24.60) ctl55.largeChange = 1 ctl55.orientation = FormControlOrientation.Horizontal ctl55.max = 10 ctl55.min = 0 ctl55.smallChange = 1 ctl55.linkedCell = ws.getRange("\$A$33") ctl55.value = 8 val ctl56 = ws.controls.addButton(265.35, 851.40, 127.04, 45.0) ctl56.horizontalTextAlignment = HorizontalAlignment.Center ctl56.orientation = TickLabelOrientation.OrientationHorizontal ctl56.verticalTextAlignment = VerticalAlignment.Center ctl56.defaultButton = true ctl56.text = "Submit" val ctl57 = ws.controls.addLabel(292.35, 671.40, 60.60, 18.00) ctl57.text = "I'm not sure" val ctl58 = ws.controls.addLabel(433.8, 672.60, 66.59, 18.60) ctl58.text = "Likely" val ctl59 = ws.controls.addLabel(143.55, 672.00, 60.59, 18.60) ctl59.text = "Unlikely" // Save to an excel file workbook.save("FeedbackForm.xlsx")