Foros del Web » Creando para Internet » Herramientas y Software »

proteger celdas xml

Estas en el tema de proteger celdas xml en el foro de Herramientas y Software en Foros del Web. Saludos, si no va en este foro me disculpo Estoy creando una plantilla desde xml , que se abrira en excel, he podido crear listas ...
  #1 (permalink)  
Antiguo 14/05/2013, 10:43
Avatar de PIRRUMAN  
Fecha de Ingreso: febrero-2006
Ubicación: Monterrey, Nuevo León
Mensajes: 633
Antigüedad: 18 años, 3 meses
Puntos: 53
proteger celdas xml

Saludos, si no va en este foro me disculpo

Estoy creando una plantilla desde xml , que se abrira en excel, he podido crear listas y formulas pero no encuentro como generar las celdas protegidas es decir que la hoja tenga contraseña para que no puedan escribir en ellas
mi codigo :
Código XML:
Ver original
  1. <?xml version="1.0"?>
  2. <?mso-application progid="Excel.Sheet"?>
  3. <Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
  4. xmlns:o="urn:schemas-microsoft-com:office:office"
  5. xmlns:x="urn:schemas-microsoft-com:office:excel"
  6. xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
  7. xmlns:html="http://www.w3.org/TR/REC-html40">
  8.  <DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
  9.   <Author>GETECSA</Author>
  10.   <LastAuthor>GETECSA</LastAuthor>
  11.   <Created>2013-04-11T22:42:14Z</Created>
  12.   <LastSaved>2013-05-07T22:28:49Z</LastSaved>
  13.   <Company>GETECSA</Company>
  14.   <Version>14.00</Version>
  15.  </DocumentProperties>
  16.  <OfficeDocumentSettings xmlns="urn:schemas-microsoft-com:office:office">
  17.   <AllowPNG/>
  18.  </OfficeDocumentSettings>
  19.  <ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
  20.   <WindowHeight>7740</WindowHeight>
  21.   <WindowWidth>13395</WindowWidth>
  22.   <WindowTopX>480</WindowTopX>
  23.   <WindowTopY>105</WindowTopY>
  24.   <ProtectStructure>False</ProtectStructure>
  25.   <ProtectWindows>False</ProtectWindows>
  26.  </ExcelWorkbook>
  27.  <Styles>
  28.   <Style ss:ID="Default" ss:Name="Normal">
  29.    <Alignment ss:Vertical="Bottom"/>
  30.    <Borders/>
  31.    <Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="11" ss:Color="#000000"/>
  32.    <Interior/>
  33.    <NumberFormat/>
  34.    <Protection/>
  35.   </Style>
  36.   <Style ss:ID="s16">
  37.    <Protection ss:Protected="0"/>
  38.   </Style>
  39.   <Style ss:ID="s17">
  40.    <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
  41.    <Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="11" ss:Bold="1"/>
  42.    <Interior ss:Color="#8DB4E2" ss:Pattern="Solid"/>
  43.    <Protection/>
  44.   </Style>
  45.   <Style ss:ID="s18">
  46.    <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
  47.    <Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="11" ss:Bold="1"/>
  48.    <Interior ss:Color="#808080" ss:Pattern="Solid"/>
  49.    <Protection/>
  50.   </Style>
  51.   <Style ss:ID="s19">
  52.    <Interior ss:Color="#DDD9C4" ss:Pattern="Solid"/>
  53.   </Style>
  54.  </Styles>
  55.  <Worksheet ss:Name="PxQ">
  56.   <Table ss:ExpandedColumnCount="6" ss:ExpandedRowCount="600" x:FullColumns="1"
  57.   x:FullRows="1" ss:DefaultRowHeight="15">
  58.    <Column ss:StyleID="s16" ss:Width="70.5"/>
  59.    <Column ss:StyleID="s16" ss:Width="92.25"/>
  60.    <Column ss:StyleID="s16" ss:Width="223.5"/>
  61.    <Column ss:StyleID="s16" ss:AutoFitWidth="0" ss:Span="1"/>
  62.    <Column ss:Index="6" ss:StyleID="s19" ss:AutoFitWidth="0"/>
  63.    <Row>
  64.     <Cell ss:StyleID="s17"><Data ss:Type="String">CODIGO SITIO</Data></Cell>
  65.     <Cell ss:StyleID="s17"><Data ss:Type="String">TIPO DE MATERIAL</Data></Cell>
  66.     <Cell ss:StyleID="s17"><Data ss:Type="String">DESCRIPCION</Data></Cell>
  67.     <Cell ss:StyleID="s17"><Data ss:Type="String">Q</Data></Cell>
  68.     <Cell ss:StyleID="s17"><Data ss:Type="String">P</Data></Cell>
  69.     <Cell ss:StyleID="s18"><Data ss:Type="String">PxQ</Data></Cell>
  70.    </Row>
  71.    <Row>
  72.     <Cell ss:Index="6" ss:Formula="=RC[-2]*RC[-1]"><Data ss:Type="Number">0</Data></Cell>
  73.    </Row>
  74.    <Row>
  75.     <Cell ss:Index="6" ss:Formula="=RC[-2]*RC[-1]"><Data ss:Type="Number">0</Data></Cell>
  76.    </Row>
  77.    <Row>
  78.     <Cell ss:Index="6" ss:Formula="=RC[-2]*RC[-1]"><Data ss:Type="Number">0</Data></Cell>
  79.    </Row>
  80.    <Row>
  81.     <Cell ss:Index="6" ss:Formula="=RC[-2]*RC[-1]"><Data ss:Type="Number">0</Data></Cell>
  82.    </Row>
  83.   </Table>
  84.   <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
  85.    <PageSetup>
  86.     <Header x:Margin="0.3"/>
  87.     <Footer x:Margin="0.3"/>
  88.     <PageMargins x:Bottom="0.75" x:Left="0.7" x:Right="0.7" x:Top="0.75"/>
  89.    </PageSetup>
  90.    <Print>
  91.     <ValidPrinterInfo/>
  92.     <HorizontalResolution>1200</HorizontalResolution>
  93.     <VerticalResolution>1200</VerticalResolution>
  94.    </Print>
  95.    <Selected/>
  96.    <FreezePanes/>
  97.    <Panes>
  98.     <Pane>
  99.      <Number>3</Number>
  100.      <ActiveRow>17</ActiveRow>
  101.      <ActiveCol>3</ActiveCol>
  102.     </Pane>
  103.    </Panes>
  104.    <ProtectContents>True</ProtectContents>
  105.    <ProtectObjects>True</ProtectObjects>
  106.    <ProtectScenarios>True</ProtectScenarios>
  107.    
  108.   </WorksheetOptions>
  109.   <DataValidation xmlns="urn:schemas-microsoft-com:office:excel">
  110.    <Range>R2C2</Range>
  111.    <Type>List</Type>
  112.    <Value>R1C1</Value>
  113.   </DataValidation>
  114.  
  115.  </Worksheet>
  116.  <sheetProtection password="e" sheet="1" objects="1" scenarios="1"/>
  117. </Workbook>

de antemano gracias
__________________
“Prefiero ser un tonto momentaneo que un eterno ignorante”
“¡El éxito es resultado de los aciertos,los aciertos resultado de la experiencia y la experiencia resultado de los errores!”

Etiquetas: celdas, editores-web, proteger, xml
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 05:19.