Search Results

Search found 4783 results on 192 pages for 'excel vba'.

Page 119/192 | < Previous Page | 115 116 117 118 119 120 121 122 123 124 125 126  | Next Page >

  • HTML + Button with text and image on it.

    - by lucky
    Hello, I have a problem in creating a Button with text and image on it. <td> <button type="submit" name="report" value="Report" <?php if($tab == 'Excel') echo "id=\"tab_inactive\""; else echo "id=\"tab_active\"" ; ?>> <img src="images/report.gif" alt="Report"/>Report </button> <button type="submit" name="excel" value="Excel" <?php if($tab == 'Excel' ) echo "id=\"tab_active\""; else echo "id=\"tab_inactive\"" ; ?>> <img src="images/Excel.gif" alt="Excel" width="16" height="16" /> Excel </button> </td> Here $tab is $tab = strlen(trim($_POST[excel]))>0 ? $_POST[excel] : $_POST[report]; I tried this way, but this is behaving so strangely. On click the button:- The submit function is working properly in firefox, but not in IE. Instead of submitting the value(in this example values are 'Report' and 'Excel'), indeed it is submitting the label of the button. That is if i am checking the value of array PRINT_R($_POST). The value of it is Array ( [report] =>(Icon that i used) Report [excel] => (Icon that i used) Excel [frm_analysis] => [to_analysis] => ) Here i have more than 1 button, then all the labels are submitted eventhough one of them is pressed. i dont how to capture which button is pressed. I even tried changing button type=button and onclick="document.formname.submit()" Even this is resulting in the same. Can you please help me to solve this.

    Read the article

  • SQL query to select a range

    - by hansika attanayake
    I need to write an sql query (in c#) to select excel sheet data in "C" column starting from C19. But i cant specify the ending cell number because more data are getting added to the column. Hence i need to know how to specify the end of the column. Please help. I have mentioned the query that im using. I need to know what should be entered at the position of "C73"? OleDbCommand ccmd = new OleDbCommand(@"Select * From [SPAT$C19:C73]", conn);

    Read the article

  • Accessing Yahoo realtime stock quotes

    - by DVK
    There's a fairly easy way of retrieving 15-minute delayed quotes off of Yahoo! Finance web site ("quotes.csv" API). However, so far I was unable to find any info on how to access real-time quotes. The hang-ups with real-time quotes are: Only available to logged-in user No API Non-obvious how to scrape the info - I'm somewhat convinced they are placed on the page by some weird Ajax call. So I was wondering if anyone had managed to develop a publically available solution to retrieve real-time quotes for a stock from Yahoo! Finance. Notes: Implementation language/framework need is flexible but Perl or Excel is highly preferred. Assume that security is not an issue - I'm willing to supply yahoo userid and pasword, even in cleartext. I'm not 100% hung up on Yahoo - they are merely the only provider of free realtime stock quotes I'm familiar with. if the same thing can be done with Google Finance, I'd be just as happy. This is for a personal project, so scalability/fault tolerance/etc... are not important. I'm looking for a "do the whole retrieval" library ideally, but if I'm pointed to partial solutions (e.g. how to retrieve info from Yahoo's user-logged-in pages; how to scrape realtime quotes from Yahoo's page) I can fill in the blanks. I saw Finance::YahooQuote but it does not seem to allow you to supply log-in information and appears to use the lagging quotes.csv API Thanks!

    Read the article

  • Custom Database integration with MOSS 2007

    - by Bob
    Hopefully someone has been down this road before and can offer some sound advice as far as which direction I should take. I am currently involved in a project in which we will be utilizing a custom database to store data extracted from excel files based on pre-established templates (to maintain consistency). We currently have a process (written in C#.Net 2008) that can extract the necessary data from the spreadsheets and import it into our custom database. What I am primarily interested in is figuring out the best method for integrating that process with our portal. What I would like to do is let SharePoint keep track of the metadata about the spreadsheet itself and let the custom database keep track of the data contained within the spreadsheet. So, one thing I need is a way to link spreadsheets from SharePoint to the custom database and vice versa. As these spreadsheets will be updated periodically, I need tried and true way of ensuring that the data remains synchronized between SharePoint and the custom database. I am also interested in finding out how to use the data from the custom database to create reports within the SharePoint portal. Any and all information will be greatly appreciated.

    Read the article

  • PHP generating csv not sending correct new line feeds

    - by sjw
    I have a script that generates a csv file using the following code: header('Content-type: text/csv'); header('Content-Disposition: attachment; filename="'.date("Ymdhis").'.csv"'); print $content; The $content variable simply contains lines with fields separated by commas and then finalised with ."\n"; to generate a new line. When I open the file in csv it looks fine however, when I try to use the file to import into an external program (MYOB) it does not recognise the End Of Line (\n) character and assumes one long line of text. When I view the contents of the file in notepad, the end of line character (\n) is a small rectangle box which looks like the character code 0x7F. If I open the file and re-save it in excel, it removes this character and replaces it with a proper end of line character and I can import the file. What character do I need to be generating in PHP so that notepad recognises it as a valid End Of Line character? (\n) obviously doesn't do the job.

    Read the article

  • C# Casting system.__comobject to class type

    - by ijrufus
    I have an Excel Add-In that I'm currently trying to set up a unit test framework for. For the unit tests I've followed this guide: http://blogs.msdn.com/b/varsha/archive/2010/08/17/writing-automated-test-cases-for-vsto-application.aspx It seems to work fine, until I want to return a class object from my interface. Specifying the class object as the return type throws a "return argument has an invalid type" exception when calling the method. Changing the return type from the class to an object allows me to call the method and get the object, but now I'm unable to cast it as the class and use it as intended, getting this exception message when I try: > Unable to cast COM object of type 'System.__ComObject' to class type > 'anaplan.Utility.XYCoordinates'. Instances of types that represent COM > components cannot be cast to types that do not represent COM > components; however they can be cast to interfaces as long as the > underlying COM component supports QueryInterface calls for the IID of > the interface. I've retrieved the Type name using VisualBasic.Information.TypeName and it's showing it as the class I expect. Is there any way to get the comobject cast back to the class? Or another way to access the properties it has? Or am I just being a bit stupid here?

    Read the article

  • Pivot table from multiple spreadsheets

    - by vrao
    I am using excel 2010. I am trying to create pivot table between two worksheets 'Summary' and 'Summary2'. I have identical row of data ranging from cells B5 to F5 in row 5 in both worksheets. Data in the two worksheets looks like this: Summary worksheet: Issues,20,3,4,5 Summary2 worksheet: Issues,10,0,3,9 Worksheet referes to issues from location 1 and worksheet referes to issues from location 2. Col B has title 'issues', Col C refers to issues of customer 1, Col D refers to issues of customer 2, Col E refers to issues of customer 3, Col F refers to issues of customer 4 I go to a third worksheet and start pivot table and in the table range I give this: 'Summary:Summary2'!$B$5:$F$5. Then I Say OK. Gives error "data reference source is not valid". Can someone tell me how to select the row from two different worksheet in pivot table? Also I want to be able to add issues of customers between two locations and get % completion for each locaiton. Can someone please help?

    Read the article

  • Type Mismatch using VBScript to create Pivot Table/Chart

    - by Rodricks
    I get Run time error:Type mismatch for the following code: Dim Field Field="Gen8" '''' ============================================================================== EXCEL Sheet '==============Errors -Stacked Chart by Year and Week --ALL WEEKS ''''=================================================== objExcel.ActiveWorkbook.Worksheets.Add SheetNumber = SheetNumber ' add adds in front so sheetnumber stays 1 objExcel.Sheets(SheetNumber).Select objExcel.Sheets(SheetNumber).Activate objExcel.Sheets(SheetNumber).Name = "YRWk" SheetName = "SYS_Product_YRWeeks" '============== strSQLCustomers = "select isnull(AB.Week,D.Week_Num) AS YRWk,ISNULL(AB.UnCorrectable,0) as UE," & _ "isnull(AB.Correctable,0) as CE, isnull(AB.SYS_Product,'" & Field & "'" & _ ") as SYS_Product from AHS_Dates D Left Join (select * from P_tot where " & _ "SYS_Product = '" & Field & "'" & _ " ) AB on AB.Year_=D.Year_ and AB.Week=D.Week_Num order by YRWk" FetchData2.Open strSQLCustomers, openConnection, adOpenStatic, adLockReadOnly If FetchData2.RecordCount > 0 Then **objExcel.ActiveWorkbook.Connections.Add SheetName, "", _ Array(Array( _ "ODBC;DRIVER=SQL Server Native Client 10.0;SERVER=" & sServerIP & ";TimeOut=5000000; Trusted_Connection=Yes;Integrated Security=SSPI;" _ ), Array("DATABASE=" & sDataBaseName & ";")), Array(strSQLCustomers), 2** objExcel.ActiveWorkbook.PivotCaches.Create(SourceType:=xlExternal, SourceData:= _ objExcel.ActiveWorkbook.Connections(SheetName), Version:= _ xlPivotTableVersion14).CreatePivotTable TableDestination:=objExcel.Sheets(SheetNumber).Name & "!R3C7", _ TableName:="PivotTable" & SheetNumber, DefaultVersion:=xlPivotTableVersion14 Set ws = objExcel.ActiveWorkbook.Worksheets(objExcel.Sheets(SheetNumber).Name) objExcel.Cells(3, 7).Select ws.Shapes.AddChart.Select objExcel.ActiveWorkbook.ActiveChart.ChartType = xlAreaStacked objExcel.ActiveWorkbook.ActiveChart.SetSourceData Source:=ws.Range(objExcel.Sheets(SheetNumber).Name & "!$G$3:$I$20") With ws.PivotTables("PivotTable1").PivotFields("SYS_PRoduct") .Orientation = xlColumnField .Position = 1 End With With ws.PivotTables("PivotTable1").PivotFields("YRWk") .Orientation = xlRowField .Position = 1 End With ' With ws.PivotTables("PivotTable1").PivotFields("Year_") ' .Orientation = xlRowField ' .Position = 2 ' End With objExcel.ActiveWorkbook.ActiveChart.ChartTitle.Text = " Errors by Week and Year -ALLWEEKS" ws.PivotTables("PivotTable1").AddDataField ws.PivotTables( _ "PivotTable1").PivotFields("UE"), "Sum of UnCorrectable", xlSum ws.PivotTables("PivotTable1").AddDataField ws.PivotTables( _ "PivotTable1").PivotFields("CE"), "Sum of Correctable", xlSum End If ''MsgBox (FetchData2.RecordCount) FetchData2.Close I have used the same pivot chart + table in other slides. The problem I think is the query length My question: 1.Is there a better way for me to access the query results. Would appreciate the steps if any. 2.If I can make it a procedure how do I modify the pivot chart/table creation. Thanks. The query results with all 52 weeks: Week UE CE SYS_Product(or Field) 1 0 0 Gen8 2 0 0 Gen8 3 0 0 Gen8 4 0 0 Gen8 5 0 0 Gen8 6 0 0 Gen8

    Read the article

  • iPhone UIWebView: loadData does not work with certain types (Excel, MSWord, PPT, RTF)

    - by Thomas Tempelmann
    My task is to display the supported document types on an iPhone with OS 3.x, such as .pdf, .rtf, .doc, .ppt, .png, .tiff etc. Now, I have stored these files only encrypted on disk. For security reasons, I want to avoid storing them unencrypted on disk. Hence, I prefer to use loadData:MIMEType:textEncodingName:baseURL: instead of loadRequest: to display the document because loadData allows me to pass the content in a NSData object, i.e. I can decrypt the file in memory and have no need to store it on disk, as it would be required when using loadRequest. The problem is that loadData does not appear to work with all file types: Testing shows that all picture types seem to work fine, as well as PDFs, while the more complex types don't. I get a errors such as: NSURLErrorDomain Code=100 NSURLErrorDomain Code=102 WebView appears to need a truly working URL for accessing the documents as a file, despite me offering all content via the NSData object already. Here's the code I use to display the content: [webView loadData:data MIMEType:type textEncodingName:@"utf-8" baseURL:nil]; The mime-type is properly set, e.g. to "application/msword" for .doc files. Does anyone know how I could get loadData to work with all types that loadRequest supports? Or, alternatively, is there some way I can tell which types do work for sure (i.e. officially sanctioned by Apple) with loadData? Then I can work twofold, creating a temp unencrypted file only for those cases that loadData won't like. Update Looks like I'm not the first one running into this. See here: http://osdir.com/ml/iPhoneSDKDevelopment/2010-03/msg00216.html So, I guess, that's the status quo, and nothing I can do about it. Someone suggested a work-around which might work, though: http://osdir.com/ml/iPhoneSDKDevelopment/2010-03/msg00219.html Basically, the idea is to provide a tiny http server that serves the file (from memory in my case), and then use loadRequest. This is probably a bit more memory-intensive, though, as both the server and the webview will probably both hold the entire contents in memory as two copies then, as opposed to using loadData, where both would rather share the same data object. (Mind you, I'll have to hold the decrypted data in memory, that's the whole point here).

    Read the article

  • excel import query error

    - by pmms
    mysql_connect("localhost","root",""); mysql_select_db("hitnrunf_db"); $result=mysql_query("select * from jos_users INTO OUTFILE 'users.csv' FIELDS ESCAPED BY '""' TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n' "); header("Content-type: text/plain"); header("Content-Disposition: attachment; filename=your_desired_name.xls"); header("Content-Transfer-Encoding: binary"); header("Pragma: no-cache"); header("Expires: 0"); print "$header\n$data"; in the above code in query string i.e string in side mysql_quey we are getting following error Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in C:\wamp\www\samples\mysql_excel\exel_outfile.php on line 8 in query string '\n' charter is not identifying as string thats why above error getting

    Read the article

  • Creating VSTO Excel Template fails

    - by Phil.Wheeler
    I have been trying for ages in all sorts of ways (short of ritual incantations and sacrifices) to get Visual Studio Team Edition 2008 to allow me to create Office 2003 solutions, whether those be templates or documents. No matter what I try, I'm always presented with an error which basically says "You've got the wrong version of Office installed. Try installing something compatible". I have the complete installation of Office 2003 Pro installed along with the Office 2003 Primary Interop Assemblies (which I put on after I installed Office) and then VS2008TE as already mentioned. There has to be some reason why this refuses to work, but I'm out of ideas. Help appreciated.

    Read the article

  • Creating one row of information in excel using a unique value

    - by user1426513
    This is my first post. I am currently working on a project at work which requires that I work with several different worksheets in order to create one mail master worksheet, as it were, in order to do a mail merge. The worksheet contains information regarding different purchases, and each purchaser is identified with their own ID number. Below is an example of what my spreadsheet looks like now (however I do have more columns): ID Salutation Address ID Name Donation ID Name Tickets 9 Mr. John Doe 123 12 Ms. Jane Smith 100.00 12 Ms.Jane Smith 300.00 12 Ms. Jane Smith 456 22 Mr. Mike Man 500.00 84 Ms. Jo Smith 300.00 What I would like to do is somehow sort my data so that everythign with the same unique identifier (ID) lines up on the same row. For example ID 12 Jane Smith - all the information for her will show up under her name matched by her ID number, and ID 22 will match up with 22 etc... When I merged all of my spreadsheets together, I sorted them all by ID number, however my problem is, not everyone who made a donation bought a ticket or some people just bought tickets and nothing us, so sorting doesn't work. Hopefully this makes sense. Thanks in advance.

    Read the article

  • writing large excel spreadsheets

    - by pstanton
    has anybody found a library that works well with large spreadsheets? I've tried apache's POI but it fails miserably working with large files - both reading and writing. It uses massive amounts of memory leaving you needing a supercomputer to parse or create a 20+mb spreadsheet. Surely there is a more memory efficient way and someone has written it?!

    Read the article

  • excel graphs using perl

    - by user1822725
    i amfacing problem when i ran the script its giving error like Can't locate object method "add_chart" via package "Spreadsheet::WriteExcel" at chart_column.pl line 33. May i know what is the problem here? And i am using perl, v5.8.5 built for x86_64-linux. #!/usr/bin/perl -w ############################################################################### # # A simple demo of Column charts in Spreadsheet::WriteExcel. # # reverse('©'), December 2009, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new( 'chart_column.xls' ); my $worksheet = $workbook->add_worksheet(); my $bold = $workbook->add_format( bold => 1 ); # Add the worksheet data that the charts will refer to. my $headings = [ 'Category', 'Values 1', 'Values 2' ]; my $data = [ [ 2, 3, 4, 5, 6, 7 ], [ 1, 4, 5, 2, 1, 5 ], [ 3, 6, 7, 5, 4, 3 ], ]; $worksheet->write( 'A1', $headings, $bold ); $worksheet->write( 'A2', $data ); ############################################################################### # # Example 1. A minimal chart. # my $chart1 = $workbook->add_chart( type => 'column' ); # Add values only. Use the default categories. $chart1->add_series( values => '=Sheet1!$B$2:$B$7' ); # Insert the chart into the main worksheet. $worksheet->insert_chart( 'E2', $chart1 );

    Read the article

  • mysql to excel exporting data using php getting html code also

    - by pmms
    hi all following is code for getting xlsheet from mysql using php ` if( ($_POST['Submit']=='generateexcel')) { $tblname=$_GET['generateexcel']; global $obj_mysql; $table="tbl_js_login"; // this is the tablename that you want to export to csv from mysql. function exportMysqlToCsv($table,$filename = 'export.csv') { $csv_terminated = "\n"; $csv_separator = ","; $csv_enclosed = '"'; $csv_escaped = "\"; $sql_query = "select fld_id, fld_fname,fld_lname from $table"; // Gets the data from the database $result = mysql_query($sql_query); $fields_cnt = mysql_num_fields($result); $schema_insert = ''; for ($i = 0; $i < $fields_cnt; $i++) { $l = $csv_enclosed . str_replace($csv_enclosed, $csv_escaped . $csv_enclosed, stripslashes(mysql_field_name($result, $i))) . $csv_enclosed; $schema_insert .= $l; $schema_insert .= $csv_separator; } // end for $out = trim(substr($schema_insert, 0, -1)); $out .= $csv_terminated; // Format the data while ($row = mysql_fetch_array($result)) { $schema_insert = ''; for ($j = 0; $j < $fields_cnt; $j++) { if ($row[$j] == '0' || $row[$j] != '') { if ($csv_enclosed == '') { $schema_insert .= $row[$j]; } else { $schema_insert .= $csv_enclosed . str_replace($csv_enclosed, $csv_escaped . $csv_enclosed, $row[$j]) . $csv_enclosed; } } else { $schema_insert .= ''; } if ($j < $fields_cnt - 1) { $schema_insert .= $csv_separator; } } // end for $out .= $schema_insert; $out .= $csv_terminated; $out1 = strip_tags($out); } // end while header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Content-Length: " . strlen($out1)); // Output to browser with appropriate mime type, you choose ;) header("Content-type: text/x-csv"); //header("Content-type: text/csv"); //header("Content-type: application/csv"); header("Content-Disposition: attachment; filename=$filename"); echo $out1; exit; } exportMysqlToCsv($table); } include_once $path."includes/jobseeker_form.php"; /* function is_duplicate($login_name) { global $obj_mysql; $sql="SELECT * FROM tbl_admin_details WHERE fld_login ='$login_name'"; $num=$obj_mysql-get_num_rows($sql); if($num==0) return false; else return true; }*/ ?` the above code we are using for genrating the xlsheet along with xlsheet we are getting html at th top . following is the screen shot of xlsheet please provide some help how to remove the html code from xlsheet

    Read the article

  • Opening an Excel worksheet inside a Webbrowser.

    - by rabindrarai
    Hi, I have opened a workbook using WebBrowser. However, it opens the first worksheet in the workbook whereas I would like to open a worksheet based on a name that I provide. Following is the code I used to open the workbook: public void OpenFile(string filename) { // Check the file exists if (!System.IO.File.Exists(filename)) throw new Exception(); m_ExcelFileName = filename; // Load the workbook in the WebBrowser control this.wbMain.Navigate(filename, false); } I would like to thank you in advance for trying to help me.

    Read the article

  • Import Data from Excel Spreadsheet or CVS into MySQL

    - by Kelly Roper
    I have a spreadsheet which really has only one complicated table. I basically convert the spreadsheet to a cvs and use a groovy script to generate the INSERT scripts. However, I cannot do this with a table that has 28 fields with data within some of the fields on the spreadsheet that make importing into the CVS even more complicated. So the fields in the new CVS are not differentiated properly or my script has not accounted for it. Does anyone have any suggestions on a better approach to do this? Thanks.

    Read the article

  • Oracle UTL_FILE - multiple rows in excel for a single cell

    - by user1879150
    I have a requirement to display the below in a csv file which is generated using UTL_FILE package of PL/SQL. Heading1 Heading2 Heading3 ABCDE 123 987641213 xxx street yyyy For each value in 'Heading1', I get 3 rows for address from a particular table. In the output csv file, I need to display the address in a single cell with data separated by a new line. I tried using a cursor and appending data using chr(10), chr(12), chr(15) but in vain. Kindly help me in getting the output.

    Read the article

  • Automating Access 2007 Queries (changing one criteria)

    - by Graphth
    So, I have 6 queries and I want to run them all once at the end of each month. (I know a bit about SQL but they're simply built using Access's design view). So, in the next few days, perhaps I'll run the 6 queries for May, as May just ended. I only want the data from the month that just ended, so the query has Criteria set as the name of the month (e.g., May). Now, it's not hugely time consuming to change all of these each month, but is there some way to automate this? Currently, they're all set to April and I want to change them all to May when I run them in a few days. And each month, I'd like to type the month (perhaps in a textbox in a form or somewhere else if you know a better way) just once and have it change all 6 queries, without having to manually open all 6, scroll over to the right field and change the Criteria. Note (about VBA): I have used Excel VBA so I know the basics of VBA but I don't really know anything specific to Access (other than seeing code a few times). And, others will use this who do not know anything about Access VBA. So, I think I have found a similar question/answer that could do this in VBA, but I'd rather do it some other way. If the query needs to be slightly redesigned later, probably by someone who doesn't know Access VBA at all, it'd be nice to have a solution not involving VBA if that is even possible.

    Read the article

< Previous Page | 115 116 117 118 119 120 121 122 123 124 125 126  | Next Page >