worksheet

Excel - Search through a column to find if text matches and count string

霸气de小男生 提交于 2020-01-04 15:28:56
问题 I want to add values from 1 worksheet to another. The first worksheet ("November 2011") simply contains name & status, names are however duplicated and a percentage of a string needs to be added on the second worksheet ("Sales"). e.g. "November 2011" A B 1 Name Status 2 McDonalds Completed 3 McDonalds Won 4 Burger King Won 5 Burger King Won 6 Wendys Completed 7 iHop Completed 8 iHop Completed The second worksheet ("Sales") contains 3 columns Name, Completed & Won. However, Name has had

Excel VBA: Workbook_Open

馋奶兔 提交于 2020-01-03 03:11:10
问题 I'm using Workbook_Open to call a userform when the application is opened, this is working fine. However I would like it to only run the first time it is opened. I tried this and it work if I run the sub from the editor but not when I open the file. Sub Workbook_Open() If Worksheets("DataSheet").Range("A1").Value = "" Then QuickStartForum.Show End If End Sub Note: A1 contains a value that will be populated after the user form has run It appears that the problem is that it opens the user form

Is there a macro to conditionally copy rows to another worksheet?

梦想与她 提交于 2020-01-02 07:20:16
问题 Is there a macro or a way to conditionally copy rows from one worksheet to another in Excel 2003? I'm pulling a list of data from SharePoint via a web query into a blank worksheet in Excel, and then I want to copy the rows for a particular month to a particular worksheet (for example, all July data from a SharePoint worksheet to the Jul worksheet, all June data from a SharePoint worksheet to Jun worksheet, etc.). Sample data Date - Project - ID - Engineer 8/2/08 - XYZ - T0908-5555 - JS 9/4/08

How can I join Excel documents using PHPExcel?

一曲冷凌霜 提交于 2019-12-30 01:08:07
问题 I'm using PHPExcel to dynamically generate order receipts. I'd like to be able to generate a "summary" Excel file, containing all the order receipts (one per worksheet). Is there a way to "join" two (or more) Excel documents into one with PHPExcel ? 回答1: In Excel, "tabs" are known as "worksheets". You can create an Excel workbook with multiple worksheets in PHPExcel. For reference, another answer on SO has an easy-to-follow guide on how to add additional Worksheets to an existing workbook.

read in online xlsx - sheet in R

拥有回忆 提交于 2019-12-25 07:52:24
问题 I have Trouble reading in this xlsx file and working with sheet=2 ( "Data") "http://www3.weforum.org/docs/gcr/2015-2016/GCI_Dataset_2006-2015.xlsx" what i did: library(readxl) library(XLConnect) library("openxlsx") temp = tempfile(fileext = ".xlsx") dataURL <- "http://www3.weforum.org/docs/gcr/2015-2016/GCI_Dataset_2006-2015.xlsx" download.file(dataURL, destfile=temp, mode='wb') file<- read.xlsx(temp, sheet= 2) I get the following: Error in .jcall("RJavaTools", "Ljava/lang/Object;",

xlwt create dynamic number of worksheets based on input

半世苍凉 提交于 2019-12-25 02:14:17
问题 I know how to create multiple worksheets and write to them if I know in advance how many worksheets I will need. For example, this code works fine if I only have 3 worksheets. (I can use a for loop to dictate the contents of each worksheet): import xlwt as xlwt workbook = xlwt.Workbook() style = xlwt.XFStyle() ws1 = workbook.add_sheet("Worksheet 1") ws2 = workbook.add_sheet('Worksheet 2') ws3 = workbook.add_sheet('Worksheet 3') # For loop to dictate contents of each worksheet here...

How to set the sheet name for a C# generated Excel spreadsheet?

夙愿已清 提交于 2019-12-24 20:03:22
问题 We generate an Excel spreadsheet in our C# .net website by writing out an HTML table to Response. This works great, but the sheet name gets set to the same as the file name. Is there away to set this? We require a certain sheet name when importing. Code: string filename = String.Format( "{0}-CopyDataBack_{1}.xls", Master.EventID.ToString(), DateTime.Now.ToString( "dd-MM-yy_HHmm" ) ); Response.Clear(); Response.Buffer = true; Response.ContentType = "application/vnd.ms-excel"; Response

EPPlus - copy worksheet from template to another excelpackage doesnt work (C#)

戏子无情 提交于 2019-12-24 17:28:11
问题 I'm having a DataSet filled with different DataTables SQL-Results. Some of the DataTables are connected with a Excel-Template-File. So in the end in want to have an excelfile with a mixture of new worksheets and copied worksheets from some template. That's why my code looks like this: public void CopyResultToExcelFileWithTemplate(DataSet sourceResult, string exportFilePath, string sourceName, string templateExcelFilePath, string sheetName = null) { var excelFile = new FileInfo(exportFilePath)

python gspread library only writes to worksheet labeled 'sheet1'

泄露秘密 提交于 2019-12-24 15:59:03
问题 My sheet is named 'doc_name', and it has two worksheets, 'sheet1' and 'sheet2'. but, i can only write data to the worksheet labeled 'sheet1'? is this a limitation or am i doing something wrong? this works, wks = gc.open("doc_name").sheet1 but this fails, wks = gc.open("doc_name").sheet2 giving this error, AttributeError: 'Spreadsheet' object has no attribute 'sheet2' i also notice that this fails, wks = gc.open("doc_name"). S heet1 ...where i use a capital 'S'.. and it will only write if i

Detect the type of Selection in a Worksheet just deactivated, in any open Workbook

限于喜欢 提交于 2019-12-24 04:41:27
问题 I want a method to inquire, after changing the ActiveSheet ( EDIT: of any open Workbook ): Detect the type of Selection in the previous active sheet (of most importance, if it was a ChartObject or Range ). If it is a Range , get the address. Is this possible ...? EDIT : ... (cont.) Without additional Activating/Deactivating to inquire (preferred). With additional Activating/Deactivating to inquire. Note that adding code to ThisWorkbook only affects that Workbook. So, I guess that something