WordML Templating With XML Schema And OpenXML SDK
Sep 21, 2010
I'm trying to use a docx read in via the OpenXML SDK as template in a .Net web app for form letters (essentially). I have a docx with the formatting I want, marked up with XML Schema tags defined from a xsd (whatever they're called, the help is exceedingly useless on this).The only thing similar I found on Google was what seemed to be replacing the CustomXmlBlock elements with text elements with the desired data. This seems... messy and fragile.I also have the added complication that some of the data is hierarchical, with elements for sections, and then items in that section. This would seem to completely break the above method.
View 1 Replies
Similar Messages:
Oct 15, 2010
I have a prototype CMS I've been working on for fun. It's completely written in ASP.NET MVC.It works on the principle of "widgets". Little blocks of functionality that can be dragged and dropped on the page, you get the idea. I have added a few simple blogging widgets which work well, one of them is the "Latest Posts" widget that goes on the front page. While the function of the widget i.e. listing the latest posts is standard, the mark-up it generates may not be. I don't want to force my users into a set in stone mark-up.I was wondering if it would be possible to use some form of templating perhaps T4? I have not delved into it deeply but it looks fairly complex, so not sure it would even be possible. What I would like is for the end-user to be able to doctor a small template file to change the markup generated for each blog post list item.If someone knows of any blogs/tutorials that may get me started I'd be very grateful. Googling for custom T4 templates brings up changes to the EditorFor templates that I'm sure everyone is familiar with.
View 1 Replies
Jul 20, 2010
I have a SQL Server 2008 DB with many tables filled with data and I used SQL Server Management Studio to generate a SQL dump by using the Script Wizard : Tasks -> Generate Scripts -> Script All objects in the selected database and also selecting the option to Script Data. I made sure to change the value of "Script for Server Version" to "SQL Server 2008". Then I created a new DB and ran the SQL dump on the new DB to generate an identical copy of the old DB. Then I assigned permissions to my default user to the new DB. Then I changed the connection string on my ASP.NET application to use the new DB. But when I run it, it throws the following exception -
Server Error in '/myapp' Application. The 'System.Web.Security.SqlMembershipProvider' requires a database schema compatible with schema version '1'. However, the current database schema is not compatible with this version. You may need to either install a compatible schema with aspnet_regsql.exe (available in the framework installation directory), or upgrade the provider to a newer version. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Configuration.Provider.ProviderException: The 'System.Web.Security.SqlMembershipProvider' requires a database schema compatible with schema version '1'. However, the current database schema is not compatible with this version. You may need to either install a compatible schema with aspnet_regsql.exe (available in the framework installation directory), or upgrade the provider to a newer version.
Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace:.........................
View 2 Replies
Jun 10, 2010
I need to work on opening a DOT (word document template) file, replace the fillers and save it as Document file.
On opening DOT file I am getting "Document File is Corrupted".
Is it possible to work with DOT file using OpenXML.
UPDATE: I am saving DOT file as XML (manually using "Save as.."). Renaming file back to dot, so it is XML file built on WordML. Still trying to open it through OpenXML giving me the same error.
View 1 Replies
Mar 18, 2010
I have created an Excel 2007 spreadsheet using DocumentFormat.OpenXml.Spreadsheet. This file is supposed to be used as an attachment to an email message. However, I get errors when opening it stating that this file cannot be opened by using Microsoft Excel. "Do you want to search... online..?" I want to save this file in Excel 2003 format so I won't get that message. What do I do? I don't want users having trouble reading the attached Excel doc.
View 8 Replies
Dec 22, 2010
I am writing C# code to read a sheet from a workbook. A couple of cells in the sheet are of Date type. However, when I check out the xml generated for the sheet, it contains numbers, for e.g. 38018 instead of 1 Feb 2005. As a result my code ends up treating this as number and I am not able to recreate a date object.
View 1 Replies
Nov 27, 2010
I have stored proc where i insert some value from openxml but it is not inserting that xml data. Below is my stored proc.
[Code]....
[Code]....
[Code]....
View 3 Replies
May 7, 2015
I try with asp.net write to template file word but dont write in file.
public void createdoc1() {
var oWordApplication = new Application();
object missing = System.Reflection.Missing.Value;
//object fileName = ConfigurationManager.AppSettings["DocxPath"];@"C:DocXExample.docx";
string fileName = @"D:120 emplate1.dot";
object newTemplate = false;
object docType = 0;
object isVisible = true;
[CODE]...
View 1 Replies
May 7, 2015
I have 25 collumn, i want export 20 collumn to sheet 1 and 5 collumn to sheet 2.
View 1 Replies
May 7, 2015
I have a problem with exporting three gridviews (main and nested gridview and sub nested gridview) to Excel fromat using ClosedXML (XLWorkbook). I read tutorial on aspsnippets and it works fine for main gridview. i refered in link [URL] ....
But its only for two gridview but i need three nested gridviews export to excel ....
protected void Page_Load(object sender, EventArgs e) {
if (!IsPostBack) {
gvCustomers.DataSource = GetData("select top 10 * from Customers");
gvCustomers.DataBind();
[Code] .....
View 1 Replies
Dec 23, 2015
I was using this UR [URL] for exporting the data to excel. Can I do the following two things while exporting:
1) I want to remove the autofilter options, which are displaying now when you open the excel workbook soon after exporting finishes.
2) Some of the columns which are numerics, are formatted to text by default, and it is displaying a small green rectangular icon at the left top corner of each cell which is very disturbing while viewing the sheet.
Is it possible to fix both the above options.
View 1 Replies
Oct 21, 2015
URL...How to put report Heading before report is generated?
<b>Employee Report</b>
Report Date:<current date>
Generated by: <login user name>
View 1 Replies
Mar 26, 2016
i have a page having 12 gridviews which cell background color depend on another cell value.now the requirement of my project is download to these 12 gridviews in single excel file in multiple sheets like gridview 1 in sheet1 gridview2 in sheet2 likewise,,,,,,,,,,,i have seen your article on downloading multiple gridviews on same page but i want in above mention format........
View 1 Replies
May 3, 2010
I'm used to MySQL and PHPMyAdmin - I had to switch over to MSSQL for an ASP.net project, and I'm having tons of trouble. I'm using the express version of SQL 2008, with SQL Server Management Studio. The following are 2 questions I've been struggling with for a while:
1) How do I export the DB schema for the database? The table structure, etc.?
2) How do I export all the data in the database?
Ideally I'd like to have a .sql file that can be run wherever I need the schema or data duplicated, for example a co-worker's computer for a shared project, or online when the project is being hosted.
View 1 Replies
Dec 14, 2010
I copied the CSS 2.1 xml file and updated it with CSS 3.0 from this cheat sheet [URL] so I could have intellisense for CSS 3.0 Problem: I saved the file as css30 in the
C:Program FilesMicrosoft Visual Studio 10.0Common7Packagesvwd
C:Program FilesMicrosoft Visual Studio 10.0Common7Packages1033schemasCSS
directories however in the build section it has no option for the file, and I cannot find out where to add it. Where can I add this option in the CSS schema dropdown? I will post the file as soon as I get it working. I am also working on HTML 5.0
View 3 Replies
Apr 12, 2010
[code]....
How to write xml schema for xml file
View 2 Replies
Jan 19, 2010
Is App_WebReferences for WCF schema files? Should this not be App_ServiceReferences?
Also, what is dynamic compilation in ASP.NET?
View 1 Replies
Feb 16, 2010
In my asp.net 2008 project, I am using the login controls... In the local sql server, there are all the necessary tables and stored procedures which the system creates for the relevant login controls. All working fine. I notice in the webconfig file there is an entry under connections, i.e.:
<add name="LocalSqlServer" connectionString="Data Source= ...
Now I would like to put the project into the Dev server. What do I do in terms
1- putting my web project into the Dev machine so that we can test it on the Dev server?
2- how do I put the login database schema into Dev? Is it just a matter of restoring my local DB into Dev?...
View 12 Replies
Feb 25, 2011
I want to create a bunch of data entry screens in an ASP.NET application based on a bunch of XSD schemas.
Are there any tools that can be used to do any of the following
1) Read in an XSD schema and generate C# busines objects
2) Read in an xsd schema and generate form controls.
View 2 Replies
Sep 3, 2010
I am writing an iPhone web app for tracking business mileage. The app uses AJAX and HTML 5 manifest caching to enable offline use. The data is stored on the server in a SQL Server database with the following schema:
When there is no network available, the app stores new data in a local database with the same schema using SQLite on the iPhone. Once a connection is aquired, the app automatically uploads the new data to the main database for permanent storage.
Now, here's the question: I have data from two databases with the same schema. How do I merge the new data into the main database using LINQ? The primary key IDs in the new data must be discarded and regenerated by the main database so that there are no ID conflicts, but the two relationships must be maintained properly.
View 1 Replies
Sep 16, 2010
I am making a db schema for facebook like wall structure. I need to save wall posts, share a link, share a video
stuff into my database. Till now I am able to make this schema :
GO
CREATE TABLE [Wall]
(
[ID] [int] NOT NULL IDENTITY(1, 1) ,
[PostText] [nvarchar](MAX)
[PostedByUserID] [int] NULL ,
[PostedOnUserID] [int] NULL ,
[DateCreated] [datetime] NULL
)
GO
Next I have to add the schema for adding the "share a link" and "share a video" feature.
GO
CREATE TABLE [Wall]
(
[ID] [int] NOT NULL IDENTITY(1, 1) ,
[WallText] [nvarchar](MAX)
[PostedByUserID] [int] NULL ,
[PostedOnUserID] [int] NULL ,
[DateCreated] [datetime] NULL,
[SharedLink] [nvarchar](1024) NULL ,
[SharedLinkTitle] [nvarchar](512) NULL ,
[SharedLinkDesc] [nvarchar](512) NULL ,
[SharedLinkImageSrc] [nvarchar](512) NULL
)
GO
Now with this schema:
1st case: When the wall post is inserted the [SharedLink], [SharedLinkTitle],[SharedLinkDesc], [SharedLinkImageSrc] columns will be inserted as null and rest of the columns will have the values.
2nd case: When the "link shared" is inserted the "[WallText]" column will be inserted as null and rest of the columns will have the values.
For my case 70% of the time the wall post will be made and 30 % "links" will be shared which means 70 % of the cases [SharedLink], [SharedLinkTitle],[SharedLinkDesc], [SharedLinkImageSrc] will be inserted as null. Now my concern is that is it okay to keep the null columns inserted or I should go for a separate table for "shared a link" purpose and have the separated table like this:
GO
CREATE TABLE [LinkShared]
(
[ID] [int] NOT NULL IDENTITY(1, 1) ,
[PostedByUserID] [int] NULL ,
[PostedOnUserID] [int] NULL ,
[SharedLink] [nvarchar](1024) NULL ,
[SharedLinkTitle] [nvarchar](512) NULL ,
[SharedLinkDesc] [nvarchar](512) NULL ,
[SharedLinkImageSrc] [nvarchar](512) NULL
)
GO
I have to go in similar manner to add the schema for sharing the videos further. Please guide me in which direction should I move?
View 1 Replies
Mar 8, 2011
i am having a database in mysql and i want to use that database schema in my project using sql server. i have a Nhibernate c#do code generated by mysql. how can i use that code.
View 1 Replies
Jun 20, 2010
I want to develop a webservice which takes xml as parameter,but it takes only xml which is validated by schema.
I want to attach it with my wsdl so when client send the message data should be varified by schema .
View 1 Replies
Nov 8, 2010
how to create schema like below for my database... and why it usefull
dbo.Employees.EmployeeNumber,
dbo.Employees.LastName + ', N' +
dbo.Employees.FirstName AS [Full Name],
dbo.Employees.HourlySalary,
dbo.TimeSheets.TimeSheetCode, dbo.TimeSheets.Week1Monday,
dbo.TimeSheets.Week1Tuesday, dbo.TimeSheets.Week1Wednesday,
dbo.TimeSheets.Week1Thursday, dbo.TimeSheets.Week1Friday,
dbo.TimeSheets.Week1Saturday, dbo.TimeSheets.Week1Sunday,
dbo.TimeSheets.Week2Monday, dbo.TimeSheets.Week2Tuesday,
dbo.TimeSheets.Week2Wednesday, dbo.TimeSheets.Week2Thursday,
dbo.TimeSheets.Week2Friday, dbo.TimeSheets.Week2Saturday,
dbo.TimeSheets.Week2Sunday
FROM dbo.Employees INNER JOIN dbo.TimeSheets
View 2 Replies
Apr 4, 2011
For configuring my ASP.Net Application I'm using Custom Configuration Sections in my web.config. But I would like to get IntelliSense support for my own-build configuration sections. I figured that it is possible to create a XSD Schema Definition and include that in the web.config. But is there a less painful way of getting that schema?
With Configuration Section Designer I found a tool offering a GUI for creating my configuration section and generating the schema. But I like coding and I don't want to learn how to deal with another GUI.
So, is there a possibility of automatically generating the schema for my code?
View 1 Replies