excel-2013

Excel 2013 VSTO Ribbon & Edit Controls

会有一股神秘感。 提交于 2019-12-03 15:22:29
The quick overview is I have an Excel AddIn targeting Excel 2013. The AddIn has a custom RibbonUI that contains a couple of read-only EditBoxes that contain workbook specific values. The same AddIn works fine in Excel 2007 & 2010, with the MDI interface, but with 2013 and its SDI interface. With a simple VSTO AddIn, I've added a simple RibbonUI with an EditBox. For testing purposes, I'm just trying to get the EditBox to reflect the Workbook.Fullname of the window in which it appears. Far as I've been able to find, the RibbonUI is a singleton and there's no apparent way to control the values of

Clear contents and formatting of an Excel cell with a single command

房东的猫 提交于 2019-12-03 10:50:35
问题 If you want to clear the contents of a cell or range in Microsoft Excel, you can use .ClearContents . If you also want to clear the formatting, you can use .ClearFormats . Sheets("Test").Range("A1:C3").ClearContents Sheets("Test").Range("A1:C3").ClearFormats If you want to do both, you can use .Delete , but then the other cells in the spreadsheet shift to replace the deleted cells. Sheets("Test").Range("A1:C3").Delete How can you remove the contents and the formatting of a cell or range in

Clear contents and formatting of an Excel cell with a single command

强颜欢笑 提交于 2019-12-03 01:19:56
If you want to clear the contents of a cell or range in Microsoft Excel, you can use .ClearContents . If you also want to clear the formatting, you can use .ClearFormats . Sheets("Test").Range("A1:C3").ClearContents Sheets("Test").Range("A1:C3").ClearFormats If you want to do both, you can use .Delete , but then the other cells in the spreadsheet shift to replace the deleted cells. Sheets("Test").Range("A1:C3").Delete How can you remove the contents and the formatting of a cell or range in VBA with a single command, without affecting the rest of the worksheet? Use the .Clear method. Sheets(

Converting large time format to decimal in excel

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-02 19:14:46
问题 I'm trying to convert a large time value in excel to a decimal number for hours. I currently have a column adding up "Ready time" for a call centre which is 3545:20:02 as a SUM. I now want that to show me the same hours in a decimal format e.g. 3545.333 as it's used in another calculation. For reference, when I convert the above time to a General excel value, it is 147.7222454. The formula I've been using is: =IFERROR((DAY(M54)*24) + HOUR(M54) + (MINUTE(M54)/60),0) and has been working fine

Chart with 1:1 scale

北慕城南 提交于 2019-12-02 17:32:36
问题 I have some problems plotting charts on Excel 2013. I want to plot a graph using the same scale for both axes (so the graph should be a square). At the moment step for both x and y are the same but the x axis is about twice the length of y axis. I know it's possible to move the boundaries of the chart. However, I want my chart to be exactly a square, which is quite difficult to achieve manually. Is it possible to do that automatically on Excel 2013? If yes, how? If not, could you please

Open Excel, Parse Data?

南笙酒味 提交于 2019-12-02 13:59:18
(Alternate Title: ReadAllLines Analogue for Excel?: What's the Best Way to Load and Manipulate Excel Data?) I would like to quickly crack open an excel sheet and perform text manipulations. I want the operation to work like ReadAllLines ( https://msdn.microsoft.com/en-us/library/s2tte0y1(v=vs.110).aspx ) but for Excel. I found the following question which is on point but seven years old. Reading Excel files from C# (Furthermore, it is an historically significant question that is frozen. Moreover, I do not have 50 points so I would not be able to comment were it open.) I cut and pasted Robin

Why do I need a space before the '^' operator in VBA for Excel 2013 or it will produce a compile time error “Expected list or separator”

我的梦境 提交于 2019-12-02 13:58:52
问题 If I type for example Sqr(a ^ 2 + b ^ 2) there is no error. But when I type Sqr(a ^ 2 + b^ 2) it produces a compile error which I do not understand: What is the function of ^ in VBA7 as opposed to _^ (underscore to show space) which denotes exponentiation? 回答1: This is a 64 bit issue. ^ can confuse the compiler as to whether an operator versus operand value as LongLong is being used. This problem occurs because the circumflex character (^) is ambiguous in this context. For 64-bit versions of

How can Office Add-in (Task-pane) not display by default

☆樱花仙子☆ 提交于 2019-12-02 12:29:44
问题 I have an Task-pane Office Add-in (https://msdn.microsoft.com/en-us/library/office/fp123523.aspx) on registered Office 365 Site. When the user opens a spreadsheet from a document library on that site, then in edit mode, can use the "Office Add-ins" from the Insert menu to insert my add-in to the Spreadsheet. My add-in helps them population and update data on the spreadsheet. They then save the spreadsheet back with the updated data. Now, the next time they open that spreadsheet, my task-pane

Setting value of a UserForm Combobox

偶尔善良 提交于 2019-12-02 12:24:33
问题 (Narrowed down from my broader question at enter link description here as advised in meta.) I have a userform. On that userform are several comboboxes for selection year, month and day. The day combobox is populated with numbers up to 28, 29, 30 or 31 depending on what year and month is selected. To avoid selecting things like the 31st of February, I'd like to check if the selected day value exceeds the maximum for that month, and reduce it appropriately. At the moment I've tried these

Chart with 1:1 scale

走远了吗. 提交于 2019-12-02 11:57:39
I have some problems plotting charts on Excel 2013. I want to plot a graph using the same scale for both axes (so the graph should be a square). At the moment step for both x and y are the same but the x axis is about twice the length of y axis. I know it's possible to move the boundaries of the chart. However, I want my chart to be exactly a square, which is quite difficult to achieve manually. Is it possible to do that automatically on Excel 2013? If yes, how? If not, could you please recommend me some other programs which could help me out? I hope my question makes sense. I really