Excel 2010 in C#
Como acessar um arquivo .xls , importar um arquivo .xls C:\\---, ler , escrever dados em suas células no C#.
Hello ThiagoG,
>>How to acess a file .xls, import a file .xls source C:\\--, read, write datas in your cells in C#?
It is not very clear what exact you are looking for, if you are trying to do the CURD operations for the .xsl file in C#, you could:
Using the ADO.NET api, for details, you could refer to this KB article:
How To Use ADO.NET to Retrieve and Modify Records in an Excel Workbook With Visual Basic .NET
Although it uses VB.NET, it is easy to convert it to C#.
You could use Excel.Interop dll:
How to: Access Office Interop Objects by Using Visual C# Features (C# Programming Guide)
Regards.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.
Similar Messages
-
Excel 2010 missing default suggested file name in Save As dialog box
I’m using Excel 2010 running on Windows 7 (32 bit). When I open a certain file which produces the following message: "A file is in a different file format than its extension indicates", and then go to “Save As” (or “Save”) the
file, the default suggested file name is missing (blank). This didn't occur in previous versions of Excel.
In previous versions, Excel would automatically populate the original file name in to the File Name field.
I have searched all over the net, looking for a way to change Excel so that it will once again populate the file name in this situation.
To reproduce:
Create a new blank workbook
save as type “Web Page”, (i.e. File name: “Blank Example.html”)
Close workbook
In windows, rename file from .html to .xls (i.e. rename “Blank Example.html” to “Blank Example.xls”)
In Excel open renamed file (i.e. “Blank Example.xls”) and click “Yes” when prompted with the “A file is in a different file format than its extension indicates” message.
Do a “Save As” and you will notice that the File Name is blank. In previous versions, this field would contain the current workbook file name
(i.e. “Blank Example.xls”)
Any help will be greatly appreciated.Hi Jaynet,
In order to re-produce this, you need to answer "yes" to the rename file prompt and then continue with step 5 (above).
The reason for this is not an exercise in futility - I assure you. At my work and elsewhere, when web developers have created features to permit the end user to save web data in Excel format, often times the Excel files are saved locally in Excel's
html format (but with the .xls
extension).
(I actually prefer the .xls
extension, because it is easier to just double-click the file to open in Excel, rather than to select the open-with and then select Excel. a file with the .html extension will default open in your default browser. Now, I could change my default program
for the .html extension, but that would only solve a part of the problem and would not really address the bigger issue and that being that Microsoft changed a behavior in Excel and may not even be aware that it was a much used feature. )
To continue, when I go to open the resulting Excel file, I am prompted with the message that the file type does not match the extension (which is fine and not bothersome to me). It's at this point when I go to save the file that I get really annoyed.
In previous versions of Excel, the default file name would be pre-filled with the current name of the file and the default file type would state that it is a Web html file. I would just change the file type to Excel Workbook and hit enter to save.
I would be prompted with "Are you sure you want to overwrite your existing file?" message and I would click "yes" and that would be that.
However, in Excel 2010, because the default file name is blank, I then need to re-type the name into the field to save the file.
Any help is greatly appreciated.
Thanks -
Unable to read data in Excel 2010/2013 from encrypted Access 2010/2013 database
A customer has an Access database (.accdb), which was encrypted/given a database password in Access 2013. It should be possible to read that data from Excel 2010/2013, but when clicking on Data-->From Access
and the correct path is put in and the correct database password has been entered, Excel just keeps prompting for the database password. This happens with both Excel 2010 and 2013.
The database password supplied is correct as evidenced by opening the database in Access 2013 using the same database password.
A colleague in a separate company has found that a separate .accdb file he has recently encrypted also has the same problem as above, yet a .accdb file encrypted ages ago
is readable from Excel.
How do I get Excel 2010/2013 to read the data from the encrypted .accdb file, please?Since Access 2010 the encryption algorithm has changed:
Source
Follow the next steps to apply an encryption method that will allow you to (programmatically) connect to the database:
1. Decrypt the database
2. Change the encryption method:
- In Access Options select 'Client Settings'
- Scroll down to section 'Advanced'
- 'Encryption Method': select option 'Use legacy encryption (..'
- Click 'OK'
3. Encrypt the database
Hope this helps.
Emiel Nijhuis -
Excel 2010 Synchronize List with SharePoint List using VBA
I have used and loved the interaction between Excel and SharePoint for many generations of both solutions. It's a wonderful opportunity to integrate the familiarity and simplicity of Excel (formatting, ease of use, availability) with the data storage
and centralized list capabilities of SharePoint. Right?
When upgrading to Excel 2010, I have noticed with much dismay that much of the inherent easy to use features of previous versions were effectively stripped from this newest version. Much research, time and energy has been spent working around and resolving
the deficiency. One Microsoft based article,
http://support.microsoft.com/kb/930006, has provided the mechanics behind utilizing the "hidden" functionality... although, this capability to use VBA to create the synchronized list was available in previous versions. However, once Microsoft
published this article to this "hidden" functionality... I feel that the behavior should be supported by Microsoft in some way. OK?
Revised instructions to reproduce the problem:
1. Create a SharePoint list with 20 dummy records.
- Note the List Name ##LIST_NAME##
- Note the View GUID ##VIEW_GUID##
- Note SharePoint Base URL ##BASE_URL##
2. REVISED... In Excel 2010, save the file as Compatible "Excel 97-2003 Workbook". Close the file and reopen. Create a connected table (ListObject) in Excel using the article above to the SharePoint list. Use Sample VBA code
below:
Sub LinkedSharePointList()
ActiveSheet.ListObjects.Add SourceType:=xlSrcExternal,_
Source:=Array(##BASE_URL## & "/_vti_bin", ##LIST_NAME##, _
##VIEW_GUID##), LinkSource:=True, Destination:=Range("A1")
End Sub
3. OOPS REVISED this item. The problem is actually with ROW 21... So, update record on row 21... (no matter where the table is located... (if the "Destination" is "A1", then the problem is with ID=20, but if the Table is
shifted down to say A12, then ID=9 on row 21). Anyway... make a simple change to that record... and you'll see the ID immediately change.... as if it's a NEW record. WEIRD! Note: If the sheet is protected, then an error is displayed
indicating that a "read-only" record cannot be updated (referring to the ID cell in column A for the current row).
4. Now "synchronize" the list with excel. The former record is still in the list unchanged AND there is a NEW record in the list holding the changes. There are a number of problems that seem to ONLY occur when something changes to ROW
21.... Next, try to copy/paste multiple records across multiple rows that intersect with ROW 21. Yikes!!
I look forward to hearing others' experience!
Thanks!
MarkHere are some things that you can try (change the code, where appropriate):
Private Sub CreateList()
Dim folder As folder
Dim f As File
Dim fs As New FileSystemObject
Dim RowCtr As Integer
RowCtr = 1
Set folder = fs.GetFolder("http://excel-pc:43231/Shared Documents/Forms/") '<=Variable Location
For Each f In folder.Files
Cells(RowCtr, 1).Value = f.Name
RowCtr = RowCtr + 1
Next f
End Sub
Sub ListAllFile()
Dim objFSO As Object
Dim objFolder As Object
Dim objFile As Object
Dim pth As String
Dim WBn As Workbook
Dim ObCount As Long
Dim FileNme As String
Application.ScreenUpdating = False
Set objFSO = CreateObject("Scripting.FileSystemObject")
'Get the folder object associated with the directory
Set objFolder = objFSO.GetFolder("\\excel-pc:43231\Shared Documents\Forms\")
'** You'll need to specify your path here. By removing the http: from the path, the code liked it & found the folder. It wasn’t working previously ***
pth = "http://excel-pc:43231/Shared Documents/Forms/"
'** You'll need to specify your path here. The reason I’ve done this separately is because the path is not recognised otherwise when trying to specify it with workbook.open & using the value set for objFolder **
ObCount = objFolder.Files.Count
'** counts the number of files in the folder
'Loop through the Files collection
For Each objFile In objFolder.Files
Nm1 = Len("http://excel-pc:43231/Shared Documents/Forms/")
'** You'll need to specify your path here **
Nm2 = Len(objFile) - Nm1
FileNme = Right(objFile, Nm2)
'** I’ve done this part to find out/set the file name**
Set WBn = Workbooks.Open(pth & FileNme, , , , Password:="YourPassword")
'** opens the first file in the library – if there is no password, the remove everything from - , , , , Password:="Password1" – leaving the close bracket ‘)’
Application.ScreenUpdating = False
'** optional – you can leave the screen updating on
'<< Your coding here>>
'** The file is now open. Enter whatever code is specific to your spreadsheets.
Next
'** goes to next file within your sharepoint folder
End Sub
Sub SharePoint()
Dim xlFile As String, xlFullFile As String
Dim xlApp As Excel.Application
Dim wb As Workbook
xlFile = "\\excel-pc:43231\Shared Documents"
'http://excel-pc:43231/Shared Documents/
'****----denotes the path.(i.e) u give the path as windows search.Don't use "\" at the end.
'In the sharepoint path %20 denotes space.so u remove that and use space .
Set xlApp = New Excel.Application
xlApp.Visible = True
xlFullFile = GetFullFileName(xlFile, "Book") 'ANZ denotes starting characters of the file.
xlFile = xlFile & "\" & xlFullFile
Set wb = xlApp.Workbooks.Open(xlFile, , False)
'Once the workbook is opened u can do ur code here
wb.Close False
End Sub
Function GetFullFileName(strfilepath As String, _
strFileNamePartial As String) As String
Dim objFS As Variant
Dim objFolder As Variant
Dim objFile As Variant
Dim intLengthOfPartialName As Integer
Dim strfilenamefull As String
Set objFS = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFS.GetFolder(strfilepath)
'work out how long the partial file name is
intLengthOfPartialName = Len(strFileNamePartial)
For Each objFile In objFolder.Files 'Instead of specifying the starting characters of the file you can directly loop through all files in the folder .
'Test to see if the file matches the partial file name
If Left(objFile.Name, intLengthOfPartialName) = strFileNamePartial Then
'get the full file name
strfilenamefull = objFile.Name
Exit For
Else
End If
Next objFile
Set objFolder = Nothing
Set objFS = Nothing
'Return the full file name as the function's value
GetFullFileName = strfilenamefull
End Function
Sub SrchForFiles()
' Searches the selected folders and sub folders for files with the specified (xls) extension.
'ListTheFiles 'get the list of all the target XLS files on the SharePoint Directory
Dim i As Long, z As Long, Rw As Long, ii As Long
Dim ws As Worksheet, dd As Worksheet
Dim y As Variant
Dim fldr As String, fil As String, FPath As String
Dim LocName As String
Dim FString As String
Dim SummaryWB As Workbook
Dim SummaryWS As Worksheet
Dim Raw_WS As Worksheet
Dim LastRow As Long, FirstRow As Long, RowsOfData As Long
Dim UseData As Boolean
Dim FirstBlankRow As Long
'grab current location for later reference, for where to paste final data
Set SummaryWB = Application.ActiveWorkbook
Set SummaryWS = Application.ActiveWorkbook.ActiveSheet
y = "xls"
fldr = "\\excel-pc:43231\Shared%20Documents\Forms\AllItems.aspx"
FirstBlankRow = 2
'asd is a 1-D array of files returned
asd = ListFiles(fldr, True)
Set ws = Excel.ThisWorkbook.Worksheets(1) 'list of files
ws.Activate
ws.Range("A1:Z100").Select
Selection.Clear
On Error GoTo 0
For ii = LBound(asd) To UBound(asd)
Debug.Print Dir(asd(ii))
fil = asd(ii)
'open the file and grab the data
Application.Workbooks.Open (fil), False, True
'Get file path from file name
FPath = Left(fil, Len(fil) - Len(Split(fil, "\")(UBound(Split(fil, "\")))) - 1)
'Get file information
If Left$(fil, 1) = Left$(fldr, 1) Then
If CBool(Len(Dir(fil))) Then
z = z + 1
ws.Cells(z + 1, 1).Resize(, 6) = _
Array(Dir(fil), LocName, RowsOfData, Round((FileLen(fil) / 1000), 0), FileDateTime(fil), FPath)
DoEvents
With ws
.Hyperlinks.Add .Range("A" & CStr(z + 1)), fil
'.FoundFiles(i)
End With
End If
End If
'Workbooks.Close 'Fil
Application.CutCopyMode = False 'Clear Clipboard
Workbooks(Dir(fil)).Close SaveChanges:=False
Next ii
With ws
Rw = .Cells.Rows.Count
With .[A1:F1]
.Value = [{"Full Name","Location","Rows of Data","Kilobytes","Last Modified", "Path"}]
.Font.Underline = xlUnderlineStyleSingle
.EntireColumn.AutoFit
.HorizontalAlignment = xlCenter
End With
.[G1:IV1 ].EntireColumn.Hidden = True
On Error Resume Next
'Range(Cells(Rw, "A").End(3)(2), Cells(Rw, "A")).EntireRow.Hidden = True
Range(.[A2 ], Cells(Rw, "C")).Sort [A2 ], xlAscending, Header:=xlNo
End With
End Sub
Function ListFiles(ByVal Path As String, Optional ByVal NestedDirs As Boolean) _
As String()
Dim fso As New Scripting.FileSystemObject
Dim fld As Scripting.folder
Dim fileList As String
' get the starting folder
Set fld = fso.GetFolder(Path)
' let the private subroutine do all the work
fileList = ListFilesPriv(fld, NestedDirs)
' (the first element will be a null string unless the first ";" is removed)
fileList = Right(fileList, Len(fileList) - 1)
' convert to a string array
ListFiles = Split(fileList, ";")
End Function
' private procedure that returns a file list
' as a comma-delimited list of files
Function ListFilesPriv(ByVal fld As Scripting.folder, _
ByVal NestedDirs As Boolean) As String
Dim fil As Scripting.File
Dim subfld As Scripting.folder
' list all the files in this directory
For Each fil In fld.Files
'If UCase(Left(Dir(fil), 5)) = "MULTI" And fil.Type = "Microsoft Excel Worksheet" Then
If fil.Type = "Microsoft Excel Worksheet" Then
ListFilesPriv = ListFilesPriv & ";" & fil.Path
Debug.Print fil.Path
End If
Next
' if requested, search also subdirectories
If NestedDirs Then
For Each subfld In fld.SubFolders
ListFilesPriv = ListFilesPriv & ListFilesPriv(subfld, NestedDirs)
Next
End If
End Function
Finally . . .
Sub ListFiles()
Dim folder As Variant
Dim f As File
Dim fs As New FileSystemObject
Dim RowCtr As Integer
Dim FPath As String
Dim wb As Workbook
RowCtr = 1
FPath = "http://excel-pc:43231/Shared Documents"
For Each f In FPath
'Set folder = fs.GetFolder("C:\Users\Excel\Desktop\Ryan_Folder")
'For Each f In folder.Files
Cells(RowCtr, 1).Value = f.Name
RowCtr = RowCtr + 1
Next f
End Sub
Sub test()
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder("C:\Users\Excel\Desktop\Ryan_Folder")
'Set colSubfolders = objFolder.SubFolders
'For Each objSubfolder In colSubfolders
Cells(RowCtr, 1).Value = f.Name
RowCtr = RowCtr + 1
'Next
End Sub
Ryan Shuell -
The goal is to synchronize an excel sheet using Microsoft Excel 2010 with Sharepoint 3.0
The goal is to synchronize an excel sheet using Microsoft Excel 2010 with Sharepoint 3.0. We have already installed an add-in (Excel 2007 Add-in: Synchronizing Tables with SharePoint Lists) that was supposed
to help the synchronization of excel to Sharepoint, but it did not work. We would like to synchronize information about a calendar from excel to Sharepoint 3.0, so every time a change is made in excel it automatically updates in Sharepoint.ootb, changes in excel don't sync with a SharePoint list, the other way around is possible.
Kind regards,
Margriet Bruggeman
Lois & Clark IT Services
web site: http://www.loisandclark.eu
blog: http://www.sharepointdragons.com -
Synchronizing Microsoft Excel 2010 with Sharepoint 3.0
We would like to synchronize calendar entries from MS Excel 2010 (64-bit) to SharePoint 3.0, so that every time a change is made in Excel, it automatically syncs in SharePoint 3.0. We have already installed
an add-in (Excel 2007 Add-in: Synchronizing Tables with SharePoint Lists) that was supposed to help the synchronization of Excel to SharePoint, but it did not work. ANY IDEAS?ootb, changes in excel don't sync with a SharePoint list, the other way around is possible.
Kind regards,
Margriet Bruggeman
Lois & Clark IT Services
web site: http://www.loisandclark.eu
blog: http://www.sharepointdragons.com -
Using Excel 2010 with SharePoint 2013 Excel services
Hello:
What features are we missing when using Excel 2010 (rather than Excel 2013) with SharePoint 2013 Excel services?
Regards
Jeff GorvitsHi Jeff,
You might want to read the articles below:
https://support.office.com/en-us/article/Whats-new-in-Power-View-in-Excel-2013-and-in-SharePoint-Server-8e3b4259-421e-41fc-a48e-854388ad14d0?ui=en-US&rs=en-US&ad=US
https://support.office.com/en-us/article/Version-compatibility-between-Power-Pivot-Data-Models-in-Excel-2010-and-Excel-2013-188f44fd-3cfd-4aa7-b4e6-a9402653cbf3?ui=en-US&rs=en-US&ad=US
Regards,
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected] .
Rebecca Tu
TechNet Community Support -
Hi
we do have the following situation
on computer A there is a Excel Document Addin development project , Visual Studio 2012, Office 2010 installed. All works fine.
we would like to bring the project to another machine with Visual Studio 2012, but Office 2013 installed.
Visual Studio can not build the project. It says that the application is not installed on the machine (though Excel 2013 is installed , but not Excel 2010) It seems to have a problem with the
vbproj.
In other forums I found a hint that "Hostpackage = ..} needs to be set accordingly in the vbproj. I created then a "empty Excel-Addin project" under Visual Studio , looked at
the Hostpackage entry, put that into the vbproj of "problem project. It still does not work.
It would be great if anyone could help.
ThomasHello Eugene
Problem is that it says that projectboard (the name of the main project) can not be loaded. All other projects in the solution can be loaded. Strange thing is , now that I try to create a empty excel Project it says that according to Excel security settings
it can not be generated !?
I opened then Excel and set all Trust Center settings to "Default" - but no effect. I really have no idea what is wrong ..!?
Tom -
Refreshing Excel 2010 workbook with connection to Access database on shared network drive
I have an Excel 2010 workbook that has a connection to an Access database that's on a shared drive on the company network. I can refresh the data in the regular Excel application but when it's hosted in the browser I get this error message "The data
connection uses Windows Authentication and user credentials could not be delegated."
Next, I installed PowerPivot for SQL server 2008 and used PowerPivot to connect to the same Access database. I uploaded it to a PowerPivot gallery but when I try to refresh the data but it says "the workbook was created in an older version of Excel
and PowerPivot and cannot be refreshed until the file is upgraded." I tried to go to "Manage data refresh" but I get the "Sorry, something went wrong" page. Do I need to install PowerPivot for SQL server 2012 to do scheduled data refreshes?
What about manual refreshes?I have an Excel 2010 workbook that has a connection to an Access database that's on a shared drive on the company network. I can refresh the data in the regular Excel application but when it's hosted in the browser I get this error message "The data
connection uses Windows Authentication and user credentials could not be delegated."
Next, I installed PowerPivot for SQL server 2008 and used PowerPivot to connect to the same Access database. I uploaded it to a PowerPivot gallery but when I try to refresh the data but it says "the workbook was created in an older version of Excel
and PowerPivot and cannot be refreshed until the file is upgraded." I tried to go to "Manage data refresh" but I get the "Sorry, something went wrong" page. Do I need to install PowerPivot for SQL server 2012 to do scheduled data refreshes?
What about manual refreshes? -
Trying to connect Excel 2010 to Oracle
Hello,
I am trying to connect Excel 2010 directly to the Oracle database at work. I was hoping to combine VBA and SQL to automate queries without having to use SQL Developer or the bespoke enterprise software to then export the data into a spreadsheet. I have downloaded the ODBC driver and installed it onto my PC. I have tried to configure the connection and the tnsnames.ora file but it will not connect (I can get the exact error from work tomorrow).
I have an XML file that contains all of the connection details (such as the ports, passwords and the server name) for the databases that I need to access. There isn’t anyone who can help me at work as the former IT manager has left and my current manager has very little technical knowledge.
The network is managed by a different part of the business at an external site containing all of the servers. Although I have an administrator account, it is very restricted so I cannot use the command prompt but I can install software.
I would be grateful for any advice. If it helps the operating system I am using is Windows Vista 32-Bit. I am unsure which version of Oracle we are using (it might be 10g but is there anything I could type into SQL Developer that would display the version of Oracle I am using?).
Many thanks in advance and sorry for probably not explaining things very well,
MattI think I am going to give in with ODBC for the time being and I don’t want to waste any of your time.
Just to make everything clear in case I missed something important out:
I ran the select banner from v$version statement and retreived:
Oracle Database 10g Release 10.2.0.5.0 - 64bit Production
PL/SQL Release 10.2.0.5.0 - Production
"CORE 10.2.0.5.0 Production"
TNS for 64-bit Windows: Version 10.2.0.5.0 - Production
NLSRTL Version 10.2.0.5.0 - Production
I originally installed the latest version of 11g ODBC and reinstalled it as I didn't think it was working. I then installed 10g version today but I couldn't find ODBC.exe file like I could in the 11g version.
I can't get the tnsnames.ora file off the database server as I can't connect to it. I know the server name but I think I may be restricted from accessing it as the network and user accounts are really locked down. I read somewhere when I was searching that there was a way of generating the tnsnames.ora file which would be quite useful as there wouldn't be any mistakes.
Like I have mentioned before I can’t access the command prompt and the only way I can connect to the database is through SQL Developer (which I have all the connections for in an XML file).
I tried the ADO method and it didn't work, but after getting home and trying something I know how to resolve the ActiveX Objects related error I was getting, so maybe I could get this method to work.
It is just frustrating that I know this could work but things aren’t as simple as I thought although the advice I have received has been really useful. Thanks for all the help. -
Excel 2010 changes relative link paths to absolute in files synced with Offline Files in Windows 7
Hello! I'm wondering if anyone else has seen this problem: I have a large number of Excel 2010 and 2003 files in a folder on my file server. This whole folder is also synced to my computer using Offline Files in Windows 7. I have a lot of references between
cells in different Excel files, and all referenced workbooks are physically in the same folder. This all works nicely when I create these files at work - all file paths referenced in the cells are created as relative paths and the documents open correctly.
This is, I understand, the expected and default behavior when Excel creates links. When I edit these files at home, nothing seems odd until I get back to work and sync these files back to the file server. At this point, I discovered that Excel 2010 has, when
I saved the files while away from the corporate network, changed /all/ the cell references in any offline-edited Excel files to point at absolute paths, and that these absolute paths point to somewhere in my %APPDATA% structure. So whenever I come to work
and I try to open an Excel file that I have recently worked with offline, I get a bunch of error messages about referenced files that are missing, although clearly they exist in the same folder as the file I've opened, and I must edit all the file references
again, whereupon they are again created correctly as relative paths (since all files exist in the same folder), which are promptly mangled into absolute C:\....\Offline Files\.....\..... paths whenever I save them at home (and since that works too, I don't
notice it again until I come back to work and the offline files are synced back to the real network location). This seems to be a case of Windows 7's Offline Files not being able to fool Excel 2010 into believing it is working on a file server - apparently
Excel 2010 can see through the fakery and decides on it's own to "fix" the problem (which obviously isn't a problem since the paths are relative to begin with) by saving the paths as absolute paths instead. Yes, really clever, Excel. The exepected behavior
according to MSKB is that links are created as relative paths, so why does it change to absolute whenever Offline Files are involved? I know Offline Files only syncs, it doesn't actually change the files, so I can conclude that Excel is the program at fault
here. Is there a fix for this, or a known workaround? Because frankly, this bug makes it impossible for me to work in any advanced manner with linked Excel files. The sad thing is that this worked perfectly fine with Office 2003 and Windows XP. Is there a
patch for this problem that I might have missed (I am running the latest Service Pack and I get Office updates from Microsoft Update). If not, is there a workaround I can use to prevent Excel from corrupting my links when I edit the files offline?Hello danceswithwindows,
Thank you for your post.
This is a quick note to let you know that we are performing research on this issue.
Sincerely
Rex Zhang
Rex Zhang
TechNet Community Support -
How to export data from MS Project 2010 to MS Excel 2010 with formatting
I have created a Project 2010 export map to Excel 2010. It works fine. I have two questions that I cannot determine an answer. I'm not sure if its a project or excel setting. I have spend hours trying to make it
work with little success.
1. When the task name field is exported to excel it losses summary/task indent. Is there a way to set it up so it works via the export map?
2. The Start & Finish fields in project is setup as 5/26/11 when they exports to excel it shows up as 5/26/11 8:00 AM. Is there a way to set it up either in project export map or excel so its formated as a date field.
Excel's Format Cell function does not seem to work converting them back to just 5/26/11.
How can I keep the outlines and formatting in my data while exporting it to Excel.
I would appreciate any guidance.
YogeshRameshchandra --
Two things I would recommend:
Do not add your question at the end of a post that is marked as Answered. In the future, please post your question as a new question so that everyone will notice it and be able to answer it.
Because this is a programming question, please repost your question as a new post in the Project Customization and Programming user forum at:
http://social.technet.microsoft.com/Forums/projectserver/en-US/home?forum=project2010custprog&filter=alltypes&sort=lastpostdesc
Hope this helps.
Dale A. Howard [MVP] -
How to reserve the page size when exporting to MS Excel 2010
Hello. I have a report which exports to MS Excel 2010. I applied the page size as legal in Crystal Report and would like to use the same page size in Excel
However, MS Excel print preview says the page size is letter.
How could I keep the same page size in Excel as I applied in Crystal Report. We have a lot of business reports and would like to avoid applying page setting manually in Excel when users print them out each time.
Thank you.Hi Christine
I am in the process of writing a doc on the different options in CR and the "No Printer" option sis one of those. Seeing this post, made me wonder as this looked like a questionable behavior. My testing does not support your observations. Now, I did a very simple test;
Created a report, set "No Printer", set the paper size and legal orientation. Exported to XLS - any format, and the export maintained legal paper size in all instance. I did a few other variations, but I can never get the report to export anything other than Landscape.
Can you please let me know the version of CR you are using?
You may also want to attach the report here with saved data (to attach rename the rpt to txt, then in the reply hit on the "Use advanced editor" link and attach.
BTW.; I am using CR 2013.
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow us on Twitter -
Error 1045 Using Report Generation Excel 2010
Hello,
The attached code throws an error 1045 when using Excel 2010. I don't get this error when using Excel 2007.
Please Advise
Thanks
Attachments:
Source.zip 66 KBTake a look at this Knowledge Base article and see if if helps.
Error 1045 When Using Report Generation Toolkit for Microsoft Office
http://digital.ni.com/public.nsf/allkb/3E4102D8B91D0F9E86256CE0006BADCB
Applications Engineer
National Instruments -
BO XI 3.1 SP3 and Excel 2010
Hi There
My BO is BO XI 3.1 SP3, and excel is 2010, my webi report has over 65523 rows, but I found in the excel, it will split into two tabs, it does not use excel 2010 feature
does any one know the reason?
thanksExcel 2010 is not suportive by BO XI 3.. It is possible in BO XI 4.0. You can try What Gowtam Allu said, but I am not sure if it works.
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/4079f8f6-2b49-2d10-d790-bc596012dc25?quicklink=index&overridelayout=true -
How to make Excel 2010 save a HTML report as a file without a folder created
We have a HTML report generated by Oracle Report with headers as below:
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns="http://www.w3.org/TR/REC-html40">
In Excel 2010, after pressing the "save" button (not "save as"), it will by default save the report as web page format instead of xls, a folder "xxx.files" containing some css, xml and html files are created
in it. If user deletes the folder carelessly, the excel report cannot be viewed at all.
In Excel 2003, we can save it directly in its original format simply by pressing the "save" button, without creating a folder. May I know if there are any options in office 2010, macro or registries settings that can make
Excel 2010 to do the same as Excel 2003 when pressing the "save" button? Thanks!Hi,
According to your description, you want a workaround to avoid creating a new folder when saving a html file in Excel 2010.
In my opinion, this issue is more related to the feature of HTML format or Excel 2010 application rather and I don't think we could resort to a macro or registry settings to avoid that. I suggest you posting it in
Excel IT pro forum for more effective responses.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.
Maybe you are looking for
-
Nik Filters Crashing Photoshop CS4??
I have been using Nik filters since they first came out. When Google took over I townload the whole free suite they offered. Than I was 'force fed' Nik Analog and it slowed all of my Nik filters down, and since then I have had periods of tremendeous
-
Broken pipe error in Sync Send JDBC Receiver: Extremely Serious issue
Hi forum, I have a serious error in a JDBC->XI--> JDBC scenario, Step1: I use a sender JDBC channel to select some distinct values from a table say X, and update the same rows, Query SQL Statement: select distinct Branch from dbo.X where status = 0
-
Preview Problem With Color Photographs
I am converting my full color Driving & Discovering Hawaii photo guidebooks to PDF for sale online. Since the books were originally published as print books on paper, all of its hundreds of photos were originally saved as CMYK. When I go to assemble
-
How to POST to wiki server through atompub?
Hi all, I'm trying to use curl to post a new entry to the leopard wiki server through the Atom Publishing Protocol, but I'm not sure if I POSt to the correct address. My server runs Mac OS 10.5 Server. Here's the POST command: curl "http://server.app
-
Oracle9i: How to reset the SCN at the APPLY target?
Oracle 9i Issue: Recovery from archive logs by changing the SCN at source and Target Explanation: While the capture SCN gets ressetted, there is no way to reset the apply SCN at the target. Due to this the SCN at the target for the applied tables is